mirror of
https://github.com/sorenisanerd/gotty.git
synced 2024-11-09 15:24:25 +00:00
41f09daf42
Now we can launch Chrome from vscode and also set breakpoints and have them be respected. Work still to be done: The "Launch Chrome" task should compile the typescript stuff. It takes too long to rebuild the typescript stuff. It is bothersome during development. If we can work around that with webpack, that's great. If generating the gotty bundle is what makes it all time consuming, we should skip the bundle generation for development and change the index.html to point to a not-bundled version. Partially fixes #3
50 lines
1.3 KiB
JavaScript
50 lines
1.3 KiB
JavaScript
const path = require('path');
|
|
const TerserPlugin = require("terser-webpack-plugin");
|
|
const LicenseWebpackPlugin = require('license-webpack-plugin').LicenseWebpackPlugin;
|
|
|
|
module.exports = {
|
|
entry: "./src/main.ts",
|
|
entry: {
|
|
"gotty": "./src/main.ts",
|
|
},
|
|
output: {
|
|
path: path.resolve(__dirname, '../bindata/static/js/'),
|
|
},
|
|
devtool: "inline-source-map",
|
|
resolve: {
|
|
extensions: [".ts", ".tsx", ".js"],
|
|
},
|
|
plugins: [
|
|
new LicenseWebpackPlugin()
|
|
],
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.tsx?$/,
|
|
loader: "ts-loader",
|
|
exclude: /node_modules/
|
|
},
|
|
{
|
|
test: /\.css$/i,
|
|
use: ["style-loader", "css-loader"],
|
|
},
|
|
{
|
|
test: /\.scss$/i,
|
|
use: ["style-loader", "css-loader", {
|
|
loader: "sass-loader",
|
|
options: {
|
|
sassOptions: {
|
|
includePaths: ["node_modules/bootstrap/scss"]
|
|
}
|
|
}
|
|
}
|
|
],
|
|
},
|
|
],
|
|
},
|
|
optimization: {
|
|
minimize: true,
|
|
minimizer: [new TerserPlugin()],
|
|
},
|
|
};
|