Cant analyse webpackdevconfjs coding assistance will ignore module resolution rules in this file Possible reasons this file is not a valid webpack configuration file or its format is not currently s
这个错误是因为在配置文件webpack.dev.conf.js中无法找到模块extract-text-webpack-plugin。可能的原因有以下几种:
-
你没有安装
extract-text-webpack-plugin模块。你可以使用以下命令安装它:npm install extract-text-webpack-plugin --save-dev -
如果你已经安装了
extract-text-webpack-plugin模块,但是在配置文件中没有正确引用它。你需要在配置文件中添加以下代码:const ExtractTextPlugin = require('extract-text-webpack-plugin');然后,在
plugins数组中添加以下配置:plugins: [ new ExtractTextPlugin('styles.css') ],这个配置将提取CSS文件并将其命名为
styles.css。
请确保以上步骤正确执行,然后重启你的开发服务器,这个错误应该就会解决了
原文地址: https://www.cveoy.top/t/topic/h98d 著作权归作者所有。请勿转载和采集!