Skip to content

Commit

Permalink
fix bundles?
Browse files Browse the repository at this point in the history
  • Loading branch information
lesleyrs committed Jul 29, 2024
1 parent 3cb2520 commit 1adc2fc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/node_modules/

/public/
/public/*
/.idea/

bz2.d.ts
Expand All @@ -12,8 +12,8 @@ bz2.wasm
/src/public/data/players
/src/public/data/src

# comment lines and provide files below to host webworker on github
# swap lines below and provide files to host a webworker server on github

/src/public/data/*
/src/public/LoginThread.js
/src/public/worker.js
# !/public/LoginThread.js
# !/public/worker.js
5 changes: 1 addition & 4 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
const webpack = require('webpack');
const path = require('path');
const fs = require('fs');

const HtmlWebpackPlugin = require('html-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const CopyPlugin = require('copy-webpack-plugin');
const TerserPlugin = require('terser-webpack-plugin');

const isProduction = process.env.NODE_ENV === 'production';
const isWebWorker = fs.existsSync('src/public/worker.js') || fs.existsSync('src/public/LoginThread.js')
const stylesHandler = isProduction ? MiniCssExtractPlugin.loader : 'style-loader';

const pages = [
Expand Down Expand Up @@ -126,8 +124,7 @@ module.exports = () => {
minify: TerserPlugin.terserMinify,
parallel: true,
terserOptions: {
module: isWebWorker,
mangle: isWebWorker ? true : {
mangle: {
properties: {
keep_quoted: true, // needed for tinymidipcm.mjs
reserved: [
Expand Down

0 comments on commit 1adc2fc

Please sign in to comment.