1234567891011121314151617181920212223242526272829303132333435363738394041 |
- const { resolve } = require("path");
- const HtmlWebpackPlugin = require('html-webpack-plugin')
- process.env.NODE_ENV = 'development'
- module.exports = {
- entry: {
-
- index: './src/js/index.js',
- test: './src/js/test.js'
- },
- output: {
-
- filename: 'js/[name].[contenthash:10].js',
- path: resolve(__dirname, 'build')
- },
- plugins:[
- new HtmlWebpackPlugin({
- template: './src/index.html',
- minify:{
- collapseWhitespace:true,
- removeComments:true
- }
- })
- ],
-
-
- optimization:{
- splitChunks:{
- chunks:'all'
- }
- },
- mode:'production'
- }
|