Fix missing index.html in prod build
This commit is contained in:
parent
1191671656
commit
b3ddaeba74
2 changed files with 5 additions and 7 deletions
|
@ -3,6 +3,7 @@ const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
|||
const CopyPlugin = require('copy-webpack-plugin');
|
||||
const packageConfig = require('./package.json');
|
||||
const WorkboxPlugin = require('workbox-webpack-plugin');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
|
||||
module.exports = {
|
||||
context: path.resolve(__dirname, 'src'),
|
||||
|
@ -14,6 +15,10 @@ module.exports = {
|
|||
},
|
||||
plugins: [
|
||||
new CleanWebpackPlugin(),
|
||||
new HtmlWebpackPlugin({
|
||||
filename: 'index.html',
|
||||
template: 'index.html'
|
||||
}),
|
||||
new CopyPlugin({
|
||||
patterns: [
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue