planet/webpack.config.js

33 lines
596 B
JavaScript

const path = require("path");
const HtmlWebpackPlugin = require('html-webpack-plugin')
module.exports = {
entry: "./src/index.js",
output: {
filename: "main.js",
path: path.resolve(__dirname, "dist")
},
module: {
rules: [
{
test: /\.(png|jpg|gif)$/,
use: [
{
loader: 'file-loader',
options: {},
},
],
},
],
},
plugins: [
new HtmlWebpackPlugin({ template: "src/index.html" })
],
devtool: "source-map",
devServer: {
watchOptions: {
ignored: /node_modules/
}
}
};