-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update SvelteKit and fix issue with
path
and sanitize-html
The solution for the problem with `sanitize-html` was to use the `dompurify` library instead which works on both client and server side. Related issues: vitejs/vite#9200 apostrophecms/sanitize-html#560
- Loading branch information
1 parent
97d82d6
commit 15de472
Showing
11 changed files
with
643 additions
and
1,327 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,19 @@ | ||
const tailwindcss = require("tailwindcss") | ||
const autoprefixer = require("autoprefixer") | ||
const cssnano = require("cssnano") | ||
import tailwindcss from 'tailwindcss' | ||
import autoprefixer from 'autoprefixer' | ||
import cssnano from 'cssnano' | ||
|
||
const mode = process.env.NODE_ENV | ||
const dev = mode === "development" | ||
const dev = mode === 'development' | ||
|
||
const config = { | ||
export default { | ||
plugins: [ | ||
//Some plugins, like tailwindcss/nesting, need to run before Tailwind, | ||
tailwindcss(), | ||
//But others, like autoprefixer, need to run after, | ||
autoprefixer(), | ||
!dev && | ||
cssnano({ | ||
preset: "default", | ||
preset: 'default', | ||
}), | ||
], | ||
} | ||
|
||
module.exports = config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { sveltekit } from '@sveltejs/kit/vite' | ||
import { defineConfig } from 'vite' | ||
|
||
export default defineConfig({ | ||
plugins: [sveltekit()], | ||
}) |