-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using b.require with react and react-dom results in an error #21
Comments
this might be fixed by a newer common-shakeify version, which this package doesn't yet use as mentioned in browserify/tinyify#14 (comment) |
I don't believe it is. I have an API example that uses common-shakeify 0.5.2 that results in a similar error: const commonModules = ['react', 'react-dom']
const g = { global: true }
const commonB = browserify()
commonB.require(commonModules)
commonB.transform('unassertify', g)
commonB.transform(envify({ _: 'purge', NODE_ENV: 'production' }), g)
commonB.transform('uglifyify', g)
commonB.plugin('common-shakeify')
commonB.plugin('browser-pack-flat/plugin')
const commonBundle = commonB.bundle().pipe(require('minify-stream')({ sourceMap: false })) |
OK, thanks for checking 👍 |
Ah right, it's to do with how it reproduces with just common-shakeify: going to try github's new transfer feature on this issue then! e; o, it fully removes it from the tinyify issue tracker … i expected/hoped that a sort of "ghost" closed issue in tinyify would remain and link to this. so it's really just for misfiled bugs and not really for things like this. oh well. |
Might be related with the other work I was doing over at browserify/browserify#1874 which for now I fixed it with more of a workaround. From what I can gather, I think the underlying issue is that |
I should add the when using |
It appears to only happen when I use them both; if I
-r
them separately then it works fine. I tried it with some simpler packages such asonce
andxtend
together and that appeared to work just fine.The package.json:
The text was updated successfully, but these errors were encountered: