packet loading

This commit is contained in:
Robin Appelman 2021-07-26 00:27:53 +02:00
commit 57650faeac
15 changed files with 11726 additions and 1662 deletions

View file

@ -1,14 +1,49 @@
const CopyWebpackPlugin = require("copy-webpack-plugin");
const path = require('path');
module.exports = {
entry: "./bootstrap.js",
output: {
path: path.resolve(__dirname, "dist"),
filename: "bootstrap.js",
},
mode: "development",
plugins: [
new CopyWebpackPlugin(['index.html'])
],
};
module.exports = [{
entry: "./bootstrap.js",
output: {
path: path.resolve(__dirname, "dist"),
filename: "bootstrap.js",
},
mode: "development",
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
],
},
resolve: {
extensions: ['.tsx', '.ts', '.js'],
},
plugins: [
new CopyWebpackPlugin({patterns: [{from: 'index.html'}]})
],
}, {
entry: "./src/worker.ts",
target: 'webworker',
output: {
path: path.resolve(__dirname, "dist"),
filename: "worker.js"
},
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
],
},
resolve: {
extensions: ['.tsx', '.ts', '.js'],
},
experiments: {
syncWebAssembly: true
},
mode: "development",
}];