2019-02-03 09:02:39 +00:00
|
|
|
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",
|
2019-02-03 09:02:39 +00:00
|
|
|
output: {
|
|
|
|
filename: "main.js",
|
2020-01-19 06:12:49 +00:00
|
|
|
path: path.resolve(__dirname, "docs")
|
2019-02-03 09:02:39 +00:00
|
|
|
},
|
|
|
|
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',
|
2019-02-03 09:02:39 +00:00
|
|
|
use: [
|
|
|
|
{
|
|
|
|
loader: 'file-loader',
|
|
|
|
options: {},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
new HtmlWebpackPlugin({ template: "src/index.html" })
|
|
|
|
],
|
|
|
|
devtool: "source-map",
|
|
|
|
devServer: {
|
|
|
|
watchOptions: {
|
|
|
|
ignored: /node_modules/
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|