add webpack
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
const path = require('path');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const CopyPlugin = require("copy-webpack-plugin");
|
||||
|
||||
module.exports = {
|
||||
entry: './src/index.js',
|
||||
output: {
|
||||
filename: 'index.js',
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
clean: true
|
||||
},
|
||||
module: {},
|
||||
plugins: [
|
||||
new HtmlWebpackPlugin({
|
||||
template: "./src/index.html"
|
||||
}),
|
||||
new CopyPlugin({
|
||||
patterns: [
|
||||
{from: "./src/style.css", to: "style.css"},
|
||||
{from: "./src/images", to: "images"},
|
||||
],
|
||||
})
|
||||
]
|
||||
};
|
||||
Reference in New Issue
Block a user