planet/webpack.config.js

43 lines
791 B
JavaScript
Raw Normal View History

const path = require("path");
const HtmlWebpackPlugin = require('html-webpack-plugin')
module.exports = {
2020-01-19 06:12:49 +00:00
entry: "./src/regl_index.js",
output: {
filename: "main.js",
2020-01-19 06:12:49 +00:00
path: path.resolve(__dirname, "docs")
},
module: {
rules: [
{
2020-01-19 06:12:49 +00:00
test: /\.(png|jpg|gif|bin)$/,
use: [
{
loader: 'file-loader',
options: {},
},
],
},
{
test: /\.json$/,
type: 'javascript/auto',
use: [
{
loader: 'file-loader',
options: {},
},
],
},
],
},
plugins: [
new HtmlWebpackPlugin({ template: "src/index.html" })
],
devtool: "source-map",
devServer: {
watchOptions: {
ignored: /node_modules/
}
}
};