嗨,我尝试退出我的webpack的人可能会通过 bottomNavigationBar: BottomNavigationBar(
unselectedItemColor: Colors.green,selectedItemColor: Colors.yellow,items:[
new BottomNavigationBarItem(icon:Icon(Icons.add_shopping_cart))
]
创建-反应应用
然后在npm run eject
内搜索该部分:
config/webpack.config.js
我打算改用CSS模块的地方。因此,请替换选项中的某些设置:
isEnvDevelopment && require.resolve('style-loader'),isEnvProduction && {
loader: MiniCssExtractPlugin.loader,// css is located in `static/css`,use '../../' to locate index.html folder
// in production `paths.publicUrlOrPath` can be a relative path
options: paths.publicUrlOrPath.startsWith('.')
? { publicPath: '../../' }
: {},},{
loader: require.resolve('css-loader'),options: cssOptions,
但是这没有用。通常,webpack具有两个配置loader: require.resolve('css-loader'),options: {
importLoaders: 1,modules: true,// This will generate these unique CSS files
// once we import them from the object
localIdentName: '[name]__[local]__[hash:base64:5]'
}
}
和webpack.config.dev.js
。最后,它输出此错误:
webpack.config.production.js
有什么解决方法吗?
您可以在此处检查整个Webpack文件:https://jsfiddle.net/15z2v9ju/