Closed liaohongze closed 6 years ago
yarn add rctui
// webpack module.exports = { ... externals: {'react': 'React', 'react-dom': 'ReactDOM', 'rctui': 'rctui'}, ... }
// html
// js import { Message } from 'rctui'
@ ./node_modules/rctui/index.js 33:0-42 @ ./app/components/Home/Changepwd.js @ ./app/components/Home/index.js @ ./app/components/Shared/data.js @ ./app/components/Shared/Dashboard.js @ ./app/containers/App.js @ ./app/containers/Root.prod.js @ ./app/containers/Root.js @ ./app/index.js @ multi react-hot-loader/patch webpack-dev-server/client?http://localhost:4000 webpack/hot/only-dev-ser ver ./app/index.js
对于webpack水平有限,请问这个错误要怎么解决?
webpack 缺配置,可以参考这个项目 https://github.com/Lobos/react-example
这个问题怎么解决的?求分享
我也遇到了,一脸懵哔,不支持扩展语法。。。不知道怎么搞
写了一个类似 create-react-app 的脚手架,用这个初始化项目吧,https://github.com/Lobos/ogier-react
yarn add rctui
// webpack module.exports = { ... externals: {'react': 'React', 'react-dom': 'ReactDOM', 'rctui': 'rctui'}, ... }
// html
// js import { Message } from 'rctui'
@ ./node_modules/rctui/index.js 33:0-42 @ ./app/components/Home/Changepwd.js @ ./app/components/Home/index.js @ ./app/components/Shared/data.js @ ./app/components/Shared/Dashboard.js @ ./app/containers/App.js @ ./app/containers/Root.prod.js @ ./app/containers/Root.js @ ./app/index.js @ multi react-hot-loader/patch webpack-dev-server/client?http://localhost:4000 webpack/hot/only-dev-ser ver ./app/index.js
对于webpack水平有限,请问这个错误要怎么解决?