const path = require("path");
module.exports = { entry:"./src/main.js", output:{ path: path.resolve(__dirname , "dist"), filename:"static/js/main.js", clean: true, }, module:{ rules:[ { test: /\.css$/, use: [ "style-loader", "css-loader" ], }, { test: /\.less$/, use: [ "style-loader", "css-loader", "less-loader" ], }, { test: /\.(png|jpe?g|gif|webp)$/, type: "asset", parser:{ dataUrlCondition:{ maxSize: 10*1024 } }, generator: { filename: 'static/imgs/[hash:8][ext][query]' } }, { test: /\.(ttf|woff2?)$/, type: "asset/resource", generator: { filename: "static/media/[hash:8][ext][query]", }, }, ], }, plugins:[ ], mode:"development" };
|