const path = require('path'), HtmlWebpackPlugin = require('html-webpack-plugin'); module.exports = { entry: './src/index.js', output: { filename: 'js/bundle.js', path: path.resolve(__dirname, 'dist') }, devtool: 'source-map', resolve: { modules: [path.resolve(__dirname, ''), path.resolve(__dirname, 'node_modules')] }, plugins: [ new HtmlWebpackPlugin({ template: path.resolve(__dirname, 'public/index.html') }) ] }
webpack
最新推荐文章于 2024-06-06 17:35:38 发布