我正在使用反应动态路线:
<Route
path="/"
getComponent={(location, cb) => {
System.import('./App')
.then(loadRoute(cb))
.catch(errorLoading);
}}
/>
我在 webpack 只有一个入口点:
context: path.resolve(__dirname),
entry: {
app: './assets/js/components/index',
},
webpack 正在为每个路由生成每个 app.js 和一个文件。
但是我生成的 html 文件没有这些 js 文件的导入。
有什么设置吗?