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:
Pauan
2020-04-29 20:59:49 +02:00
committed by GitHub
parent 6d61cd8b76
commit 7bee6a8c19
3 changed files with 4 additions and 4 deletions

View File

@ -1251,7 +1251,7 @@ impl<'a> Context<'a> {
self.global(&format!(
"
const l{0} = typeof {0} === 'undefined' ? \
require('util').{0} : {0};\
(0, module.require)('util').{0} : {0};\
",
s
));