diff --git a/src/styles/element-variables.scss b/src/styles/element-variables.scss index 4779894d..4348ace1 100644 --- a/src/styles/element-variables.scss +++ b/src/styles/element-variables.scss @@ -19,6 +19,8 @@ $--border-color-lighter: #e6ebf5; $--table-border: 1px solid #dfe6ec; +$--font-path: "~element-plus/theme-chalk/fonts"; + // the :export directive is the magic sauce for webpack // https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass :export { diff --git a/src/styles/element-variables.scss.d.ts b/src/styles/element-variables.scss.d.ts new file mode 100644 index 00000000..cc6cf24d --- /dev/null +++ b/src/styles/element-variables.scss.d.ts @@ -0,0 +1,6 @@ +export interface ScssVariables { + theme: string +} +export const variables: ScssVariables + +export default variables diff --git a/vite.config.ts b/vite.config.ts index 7b53a642..bfb0cd39 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -43,14 +43,14 @@ export default ({command, mode}: ConfigEnv): UserConfig => { }, // SCSS 变量导出 // @see https://www.vitejs.net/config/#css-preprocessoroptions - css: { + /*css: { preprocessorOptions: { scss: { additionalData: `@import "./src/styles/element-variables.scss";`, javascriptEnabled: true } } - } + }*/ } ) }