40 lines
839 B
JavaScript
40 lines
839 B
JavaScript
const path = require('path');
|
|
const GasPlugin = require("gas-webpack-plugin");
|
|
const TerserPlugin = require('terser-webpack-plugin');
|
|
|
|
module.exports = {
|
|
entry: './src/global.ts',
|
|
optimization: {
|
|
minimize: false,
|
|
minimizer: [
|
|
new TerserPlugin({
|
|
terserOptions: {
|
|
keep_classnames: true,
|
|
keep_fnames: true
|
|
}
|
|
})
|
|
]
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.ts?$/,
|
|
use: 'ts-loader',
|
|
exclude: /node_modules/,
|
|
},
|
|
],
|
|
},
|
|
resolve: {
|
|
extensions: ['.tsx', '.ts', '.js'],
|
|
},
|
|
output: {
|
|
path: path.resolve(__dirname, 'dist'),
|
|
filename: 'bundle.js'
|
|
},
|
|
plugins: [
|
|
new GasPlugin({
|
|
comment: true,
|
|
autoGlobalExportsFiles: ['**/*.ts'],
|
|
})
|
|
]
|
|
}; |