diff --git a/docs/en-US/guide/theming.md b/docs/en-US/guide/theming.md index 29fd61972f..d0678ecf4f 100644 --- a/docs/en-US/guide/theming.md +++ b/docs/en-US/guide/theming.md @@ -161,6 +161,30 @@ export default defineConfig({ }) ``` +If you are using webpack, and you want to custom theme when importing on demand. + +```ts +// webpack.config.ts +// use unplugin-element-plus + +import ElementPlus from 'unplugin-element-plus/webpack' + +export default defineConfig({ + css: { + loaderOptions: { + scss: { + additionalData: `@use "~/styles/element/index.scss" as *;`, + }, + }, + }, + plugins: [ + ElementPlus({ + useSource: true, + }), + ], +}) +``` + ### By CSS Variable CSS Variables is a very useful feature, already supported by almost all browsers. (IE: Wait?)