mirror of
https://github.com/element-plus/element-plus.git
synced 2024-11-27 02:01:15 +08:00
docs(theme-chalk): update the modification guide introduced by webpack on demand (#6496)
This commit is contained in:
parent
593082ec65
commit
0d6cfc60b8
@ -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?)
|
||||
|
Loading…
Reference in New Issue
Block a user