-
-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
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
[react-cascader]:在nextjs中单独引入cascader组建无法运行 #902
Comments
参考:uiwjs/react-md-editor#52 (comment) 为此问题创建了一个 nextjs 的包:https://github.com/uiwjs/next-remove-imports 这是因为 nextjs 不支持 node_modules 包中引入 css,使用 next-remove-imports 删除代码中的 css 引用。 |
这样可以运行了 , 但是这个插件是不是删除了 我的其他ui库的 css? react-cascader 组建的样式也丢失了 @jaywcjlove |
@ananiahfox 它是移除 这个 "dependencies": {
"@uiw/react-dropdown": "^4.21.14",
"@uiw/react-icon": "^4.21.14",
"@uiw/react-input": "^4.21.14",
"@uiw/react-loader": "^4.21.14",
"@uiw/react-menu": "^4.21.14",
"@uiw/react-tag": "^4.21.14",
"@uiw/utils": "^4.21.14"
} https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-cascader/file/package.json 或者你直接引入编译好的全部 css 文件 |
好的好的 我试试。感谢感谢🙏 |
注意:根据下面内容复现错误问题,以方便测试。
在nextjs中单独引入cascader组建无法运行
uiw 是否支持nextjs
在nextjs 中引入 @uiw/react-cascader 报错
重现行为的步骤:
报错
./node_modules/@uiw/react-cascader/esm/style/index.css Global CSS cannot be imported from within node_modules. Read more: https://nextjs.org/docs/messages/css-npm Location: node_modules/@uiw/react-cascader/esm/index.js
The text was updated successfully, but these errors were encountered: