Add missing variable for worker

This commit is contained in:
Tornado Contrib 2024-10-06 02:29:21 +00:00
parent 51f737b728
commit 4517393017
Signed by: tornadocontrib
GPG Key ID: 60B4DF1A076C64B1
3 changed files with 12 additions and 1 deletions

@ -1,3 +1,5 @@
globalThis.process = { browser: true, env: {}, };
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();

File diff suppressed because one or more lines are too long

@ -1,3 +1,4 @@
const { BannerPlugin } = require('webpack');
const path = require('path');
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin');
@ -82,6 +83,10 @@ module.exports = [
},
plugins: [
new NodePolyfillPlugin(),
new BannerPlugin({
banner: 'globalThis.process = { browser: true, env: {}, };\n',
raw: true,
}),
],
resolve: {
extensions: ['.tsx', '.ts', '.js'],
@ -106,6 +111,10 @@ module.exports = [
},
plugins: [
new NodePolyfillPlugin(),
new BannerPlugin({
banner: 'globalThis.process = { browser: true, env: {}, };',
raw: true,
}),
],
resolve: {
extensions: ['.tsx', '.ts', '.js'],