Closed DonaldY closed 6 years ago
html 打开后发现console里有 webpackJsonp is not defined
webpackJsonp is not defined
在 plugins.config.js中, 'commons/commons' 在 page 后然后就报这个。
pageArr.forEach((page) => { const htmlPlugin = new HtmlWebpackPlugin({ filename: `${page}/page.html`, template: path.resolve(dirVars.pagesDir, `./${page}/html.js`), chunks: ['webpack-runtime', page, 'commons/commons'], hash: true, // 为静态资源生成hash值 xhtml: true, }); configPlugins.push(htmlPlugin); });
so, 公共文件要先引入。
有理解错误的话,望见谅,望能指出。
html 打开后发现console里有
webpackJsonp is not defined
在 plugins.config.js中, 'commons/commons' 在 page 后然后就报这个。
so, 公共文件要先引入。
有理解错误的话,望见谅,望能指出。