We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NutuiResolve 这个方法有点问题。它会导致在 Linux 环境下找不到对应的路径。因为 Nutui 的包实际都是小写的。所以我自己写了个 resolve。希望官方可以改进一下:
The text was updated successfully, but these errors were encountered:
我也遇到这没问题,请问你写这个怎么用
Sorry, something went wrong.
不用改源码啊。你就在 vite.config.js 里重写这个函数,然后在 plugins 那里加进去就可以了。 vite.config.js : function NutuiResolve () { return { libraryName: '@nutui/nutui', libraryNameChangeCase: 'pascalCase', resolveStyle: (name) => { name = name.toLowerCase() return @nutui/nutui/dist/packages/${name}/index.scss } } } ..... createStyleImportPlugin({ resolves: [ NutuiResolve() ] })
function NutuiResolve () { return { libraryName: '@nutui/nutui', libraryNameChangeCase: 'pascalCase', resolveStyle: (name) => { name = name.toLowerCase() return @nutui/nutui/dist/packages/${name}/index.scss } } } ..... createStyleImportPlugin({ resolves: [ NutuiResolve() ] })
@nutui/nutui/dist/packages/${name}/index.scss
No branches or pull requests
NutuiResolve 这个方法有点问题。它会导致在 Linux 环境下找不到对应的路径。因为 Nutui 的包实际都是小写的。所以我自己写了个 resolve。希望官方可以改进一下:
The text was updated successfully, but these errors were encountered: