Update typescript, webpack, and asset building

This commit is contained in:
Soren L. Hansen 2021-04-16 06:49:17 -07:00
parent f3af8fcafd
commit d9fe29e9c7
14 changed files with 1144 additions and 2257 deletions

View file

@ -1,9 +1,12 @@
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
const path = require('path');
module.exports = {
entry: "./src/main.ts",
entry: {
"gotty": "./src/main.ts",
},
output: {
filename: "./dist/gotty-bundle.js"
path: path.resolve(__dirname, '../bindata/static/js/'),
},
devtool: "source-map",
resolve: {
@ -16,14 +19,15 @@ module.exports = {
loader: "ts-loader",
exclude: /node_modules/
},
{
test: /\.css$/i,
use: ["style-loader", "css-loader"],
},
{
test: /\.js$/,
include: /node_modules/,
loader: 'license-loader'
}
]
},
],
},
plugins: [
new UglifyJSPlugin()
]
};