mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-19 07:51:26 +00:00
Fixing require to be ignored by Webpack (#2115)
* Fixing require to be ignored by Webpack * Making the module.require even more dynamic, to trick Webpack
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import * as wasm from './reference_test_bg.wasm';
|
||||
|
||||
const lTextDecoder = typeof TextDecoder === 'undefined' ? require('util').TextDecoder : TextDecoder;
|
||||
const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
|
||||
|
||||
let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
||||
|
||||
|
Reference in New Issue
Block a user