| 123456789101112131415161718192021222324252627 |
- const path = require('path')
- module.exports = {
- mode: 'production',
- // entry:'./src/a.js'
- entry: ['./src/a.js', './src/b.js'],
- // entry: {
- // hi:'./src/b.js',
- // ha:'./src/a.js'
- // }
- output: {
- // clean: true, // 清楚打包文件中的其他文件
- // filename:'[name]-[id]-[hash].js', //输出文件名字
- // path:path.resolve(__dirname,'news') // 打包文件夹输出
- },
- module: {
- rules: [
- {
- test: /\.css$/i,
- use: ['style-loader', 'css-loader'],
- },
- {
- test: /\.(png|svg|jpg|jpeg|gif)$/i,
- type: 'asset/resource',
- },
- ],
- },
- }
|