-
Notifications
You must be signed in to change notification settings - Fork 16
[FR] element-plus
^1.0.2-beta.59 support
#19
Comments
Do you want to update this for the updates? |
@JeremyWuuuuu Yes, I can do it if the upstream issue gets fixed. |
Use locale didn't have any exported CSS since it is not a component at all, to get this fixed, you need to update the plugin configuration, to ignore the pattern of |
To be more specific:
{
customStyleName: (name) => {
if (/^use/.test(name)) return ''
name = name.slice(3)
return `element-plus/packages/theme-chalk/src/${name}.scss`;
},
} |
The vite plugin goes the same way, you need to do a little bit tweak on that though, we are planning to build a vite plugin of our own, so that you won't need to worry about that anymore. |
@JeremyWuuuuu I've updated module.exports = {
presets: ['@vue/cli-plugin-babel/preset'],
plugins: [
[
'import',
{
libraryName: 'element-plus',
customStyleName: name =>
/^use/.test(name) ? '' : `element-plus/lib/theme-chalk/${name}.css`,
},
],
],
} Seems not working. |
@wenfangdu you forgot to add the From Jeremy:
|
@JeremyWuuuuu Even return empty string for module.exports = {
presets: ['@vue/cli-plugin-babel/preset'],
plugins: [
[
'import',
{
libraryName: 'element-plus',
customStyleName: () => '',
},
],
],
}
I've updated my repro to reflect this, please have a look. |
Due to an i18n breaking change in 1.0.2-beta.59, the current generated setup would throw:
Related issue:
The text was updated successfully, but these errors were encountered: