在我正在构建的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']
}
};
相同错误...
非常感谢您的帮助。我是构建应用程序的新手。谢谢