-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: switch to sass-embedded and remedy sass API deprecation warnin…
…gs (#1926) - add `sass-embedded` to catalog and use it instead of `sass` - add workspace package `@sit-onyx/shared` for shared configs - add `vite.config.base.ts` file for shared Vite base config - right now we can't use a module import because of an [open Vite issue](vitejs/vite#5370). We have to use a relative import instead.
- Loading branch information
Showing
15 changed files
with
458 additions
and
281 deletions.
There are no files selected for viewing
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,7 +1,7 @@ | ||
import vue from "@vitejs/plugin-vue"; | ||
import { defineConfig } from "vite"; | ||
import { VITE_BASE_CONFIG } from "./node_modules/@sit-onyx/shared/vite.config.base"; | ||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
plugins: [vue()], | ||
...VITE_BASE_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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ | |
"sit-onyx": "workspace:^" | ||
}, | ||
"devDependencies": { | ||
"@sit-onyx/shared": "workspace:^", | ||
"vue": "catalog:" | ||
} | ||
} |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import vue from "@vitejs/plugin-vue"; | ||
import { defineConfig } from "vite"; | ||
import { VITE_BASE_CONFIG } from "./node_modules/@sit-onyx/shared/vite.config.base"; | ||
|
||
// https://vitejs.dev/config | ||
export default defineConfig({ | ||
plugins: [vue()], | ||
...VITE_BASE_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"name": "@sit-onyx/shared", | ||
"version": "1.0.0", | ||
"description": "", | ||
"private": true, | ||
"type": "module", | ||
"peerDependencies": { | ||
"@vitejs/plugin-vue": "^5.1.4", | ||
"sass-embedded": "catalog:", | ||
"vue": "catalog:" | ||
} | ||
} |
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,20 @@ | ||
import vue from "@vitejs/plugin-vue"; | ||
import { deprecations, type Deprecation, type Options } from "sass-embedded"; | ||
import type { UserConfig } from "vite"; | ||
|
||
type ViteScssOptions = Options<"async"> & { api: "modern-compiler" }; | ||
|
||
export const VITE_BASE_CONFIG = { | ||
plugins: [vue()], | ||
css: { | ||
preprocessorOptions: { | ||
scss: { | ||
api: "modern-compiler", | ||
// error for all warnings | ||
fatalDeprecations: (Object.values(deprecations) as Deprecation[]).filter( | ||
({ status }) => status !== "future", | ||
), | ||
} satisfies ViteScssOptions, | ||
}, | ||
}, | ||
} satisfies UserConfig; |
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
Oops, something went wrong.