IPv6Penguin/webpack/base.js
2019-09-19 14:13:37 +06:00

38 lines
862 B
JavaScript

const webpack = require("webpack");
const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const CleanWebpackPlugin = require("clean-webpack-plugin");
module.exports = {
mode: "development",
devtool: "eval-source-map",
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: "babel-loader"
}
},
{
test: [/\.vert$/, /\.frag$/],
use: "raw-loader"
},
{
test: /\.(gif|png|jpe?g|svg|xml)$/i,
use: "file-loader"
}
]
},
plugins: [
new webpack.DefinePlugin({
"typeof PLUGIN_FBINSTANT": JSON.stringify(true),
CANVAS_RENDERER: JSON.stringify(true),
WEBGL_RENDERER: JSON.stringify(true),
}),
new HtmlWebpackPlugin({
template: "./index.html"
})
]
};