在index.ts中导入其他ts文件,执行 npm run build 出现:
解决方法:
在webpack.config.js中添加引用模块
module.exports = {
// 引用模块
resolve: {
extensions:[".ts", ".js"]
},
}
再次执行---完美!
非常感谢------
使用Webpack设置TS引用模块,解决Module not found: Error: Can‘t resolve ‘./m1‘ in ...问题_永久旅途的博客-优快云博客