2021-10-12 14:02:34 +05:30
|
|
|
'use strict';
|
|
|
|
const path = require('path');
|
|
|
|
//const WasmPackPlugin = require('@wasm-tool/wasm-pack-plugin');
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
devtool: 'inline-source-map',
|
|
|
|
mode: 'development',
|
|
|
|
//mode: 'production',
|
|
|
|
entry: {
|
|
|
|
bundle: './templates/index.ts',
|
2021-10-14 20:02:54 +05:30
|
|
|
bench: './templates/bench/service-worker.ts',
|
|
|
|
glue: './templates/bench/vendor.ts',
|
2021-10-12 14:02:34 +05:30
|
|
|
},
|
|
|
|
output: {
|
|
|
|
filename: '[name].js',
|
|
|
|
path: path.resolve(__dirname, './static/cache/bundle'),
|
|
|
|
},
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.tsx?$/,
|
|
|
|
loader: 'ts-loader',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
resolve: {
|
|
|
|
extensions: ['.ts', '.tsx', '.js'],
|
|
|
|
},
|
|
|
|
|
|
|
|
experiments: {
|
|
|
|
// executeModule: true,
|
|
|
|
// outputModule: true,
|
|
|
|
//syncWebAssembly: true,
|
|
|
|
// topLevelAwait: true,
|
|
|
|
asyncWebAssembly: true,
|
|
|
|
// layers: true,
|
|
|
|
// lazyCompilation: true,
|
|
|
|
},
|
|
|
|
};
|