We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
const { AutoWebPlugin } = require('web-webpack-plugin'); // 使用本文的主角 AutoWebPlugin,自动寻找 pages 目录下的所有目录,把每一个目录看成一个单页应用 const autoWebPlugin = new AutoWebPlugin('pages', { template: './template.html', // HTML 模版文件所在的文件路径 postEntrys: ['./common.css'],// 所有页面都依赖这份通用的 CSS 样式文件 // 提取出所有页面公共的代码 commonsChunk: { name: 'common',// 提取出公共代码 Chunk 的名称 }, }); module.exports = { // AutoWebPlugin 会为寻找到的所有单页应用,生成对应的入口配置, // autoWebPlugin.entry 方法可以获取到所有由 autoWebPlugin 生成的入口配置 entry: autoWebPlugin.entry({ // 这里可以加入你额外需要的 Chunk 入口 }), plugins: [ autoWebPlugin, ], };
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: