You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On upgrading to pica 6 (from 5.3) I am seeing "Uncaught ReferenceError: require is not defined" on my production browserify build. I have tracked the problem to browser-pack-flat, which is used by tinyify to minify the build.
browser-pack-flat says it "rewrites require() calls to simple variable assignments. If a module wraps require() somehow it probably will not work. In practice this is quite rare.".
Could you please explain what changed with the browserify build in pica 6, and whether it is rewriting require calls? Is this a hack? I am wondering whether there is an alternative approach to the recent changes that would fix this new ReferenceError.
I can actually avoid the ReferenceError by configuring tinyify not to use browser-pack-flat, but it does mean that the build files will be slightly larger.
And thanks again for pica :-)
Greg
The text was updated successfully, but these errors were encountered:
It now uses "compiled" file as main entry, and derequire to allow browserify external packages. For eample, https://github.com/nodeca/image-blob-reduce build will fail without derequire.
Hi there,
On upgrading to pica 6 (from 5.3) I am seeing "Uncaught ReferenceError: require is not defined" on my production browserify build. I have tracked the problem to browser-pack-flat, which is used by tinyify to minify the build.
browser-pack-flat says it "rewrites require() calls to simple variable assignments. If a module wraps require() somehow it probably will not work. In practice this is quite rare.".
Could you please explain what changed with the browserify build in pica 6, and whether it is rewriting require calls? Is this a hack? I am wondering whether there is an alternative approach to the recent changes that would fix this new ReferenceError.
I can actually avoid the ReferenceError by configuring tinyify not to use browser-pack-flat, but it does mean that the build files will be slightly larger.
And thanks again for pica :-)
Greg
The text was updated successfully, but these errors were encountered: