这个错误是因为在配置文件webpack.dev.conf.js中无法找到模块extract-text-webpack-plugin。可能的原因有以下几种:

  1. 你没有安装extract-text-webpack-plugin模块。你可以使用以下命令安装它:

    npm install extract-text-webpack-plugin --save-dev
    
  2. 如果你已经安装了extract-text-webpack-plugin模块,但是在配置文件中没有正确引用它。你需要在配置文件中添加以下代码:

    const ExtractTextPlugin = require('extract-text-webpack-plugin');
    

    然后,在plugins数组中添加以下配置:

    plugins: [
      new ExtractTextPlugin('styles.css')
    ],
    

    这个配置将提取CSS文件并将其命名为styles.css。

请确保以上步骤正确执行,然后重启你的开发服务器,这个错误应该就会解决了

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

原文地址: https://www.cveoy.top/t/topic/h98d 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录