在输入模块中找不到错误:错误:无法解决与webpack.config.js有关的问题

时间:2018-12-18 19:45:05

标签: google-maps-markers gulp-watch webpack-4 webpack.config.js

在我正在构建的Wordpress应用的import GoogleMap from './modules/GoogleMap’;中导入var googleMap = new GoogleMap();modules/scripts.js之后,我收到了重新捆绑更新脚本的错误。完整错误为:

`MacBook-Pro-2:wordpress Fighi$ gulp scripts
[14:28:28] Using gulpfile /Applications/MAMP/htdocs/wordpress/gulpfile.js
[14:28:29] Starting 'scripts'...
Hash: 7f21ae405761f9b513c9
Version: webpack 4.8.2
Time: 113ms
Built at: 12/18/2018 2:28:29 PM

ERROR in Entry module not found: Error: Can't resolve '/Applications/MAMP/htdocs/wordpress/wp-content/themes/university-test-sitejs/scripts.js' in '/Applications/MAMP/htdocs/wordpress’`

我听取了您的建议,即其中的一条建议,并将这行代码添加到webpack.config.js文件中

module.exports = {
  //...
  resolve: {
    extensions: ['.js', '.jsx']
  }
};

相同错误...

非常感谢您的帮助。我是构建应用程序的新手。谢谢

0 个答案:

没有答案