2021-11-03 11:08:40 +00:00
|
|
|
const path = require('path');
|
|
|
|
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
|
|
|
const HTMLWebpackPlugin = require('html-webpack-plugin');
|
2021-11-04 19:58:37 +00:00
|
|
|
const TerserWebpackPlugin = require('terser-webpack-plugin');
|
2021-11-03 11:08:40 +00:00
|
|
|
const Package = require('./package');
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
entry: './src/game/index.js',
|
|
|
|
devtool: 'inline-source-map',
|
|
|
|
performance: {
|
|
|
|
hints: false
|
|
|
|
},
|
2021-11-04 19:58:37 +00:00
|
|
|
optimization: {
|
|
|
|
minimizer: [new TerserWebpackPlugin()]
|
|
|
|
},
|
2021-11-03 11:08:40 +00:00
|
|
|
"plugins": [
|
|
|
|
new HTMLWebpackPlugin({
|
|
|
|
title: Package.name,
|
|
|
|
template: path.join(__dirname, "src/game/index.html")
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.js?$/,
|
|
|
|
exclude: /node_modules/
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
resolve: {
|
|
|
|
extensions: [ '.ts', '.js' ]
|
|
|
|
},
|
|
|
|
output: {
|
|
|
|
filename: 'game.js',
|
|
|
|
path: path.resolve(__dirname, 'app_web')
|
|
|
|
}
|
|
|
|
};
|