折腾:
期间,去给webpack加了配置,解决了:
【已解决】ant-design-mobile配置webpack出错:configuration.resolve has an unknown property modulesDirectories
对于改动后的:
extensions: [”, ‘.web.js’, ‘.jsx’, ‘.js’, ‘.json’, ‘.less’], |
又出现了:
Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema. – configuration.resolve.extensions[0] should not be empty. |
configuration.resolve.extensions[0] should not be empty
去掉””
或改为:”*”
或改为:’*’
javascript – Why does webpack need an empty extension – Stack Overflow
webpack学习篇一 从 v1 迁移到 v2 丨 智杰之家 – 关注互联网开发
去掉空字符串即可
Webpack: Error: configuration.resolve.extensions[0] should not be empty – Michelle Liu
改为:
extensions: [‘*’, ‘.js’, ‘.es6’]
javascript – webpack 2 cannot resolve empty extensions – Stack Overflow
【总结】
把:
extensions: [”, ‘.web.js’, ‘.jsx’, ‘.js’, ‘.json’, ‘.less’], |
去改为:
extensions: [‘*’, ‘.web.js’, ‘.jsx’, ‘.js’, ‘.json’, ‘.less’], |
结果:
即可消除此警告,希望真的是可以正常加载了没有后缀的文件。
转载请注明:在路上 » 【已解决】ant-design-mobile配置webpack出错:configuration.resolve.extensions[0] should not be empty