-
Notifications
You must be signed in to change notification settings - Fork 33
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
flushChunkNames() returning empty array with base reactQL setup #20
Comments
Sorry to keep creating and closing issues. This was fixed by ditching the webpack-node-externals using the whitelist options, and constructing the externals object myself. |
Not a problem...You know, i need to look into why webpack-node-externals is problematic. If you have time, it would be great to get some clues on why it doesn't work. no pressure. |
Will definitely look into it! It's the least I could do. Thanks again for your awesome work. |
I'd really like to know why webpack-node-externals won't work.. I've tried to get it to work with react-universal-component and webpack-flush-chunks, but nothing works. I've got kinda complex externals, so your version of node-externals will not work unfortunately. Any idea what could be causing the incompatibility with webpack-node-externals? |
After putting the babel plugin into my own application: const babelOptions = {
presets: ['react'],
plugins: [
'syntax-dynamic-import',
'transform-object-rest-spread',
// 'transform-es2015-destructuring',
'transform-decorators-legacy',
'transform-class-properties',
'transform-es2015-classes',
['import', { libraryName: 'antd', style: true }],
resolve(__dirname, 'universal-import'),
],
}; The problem with webpack-node-externals disappeared and server works perfectly fine. |
Thanks so much for your work. This is potentially the perfect solution for us.
I am setting up an app based on the boilerplate reactQL - on the base install, I have set up all the necessary components of react-universal-component on the client and server.
I now have imports that get compiled down to this:
when you navigate to this page, you correctly get the bundle as a separate request. On the SSR though, both the client and server first initialize in their 'loading...' state. So I have moved on to implementing webpack-flush-chunks.
this is a segment of the server render:
flushChunkNames() always returns an empty array, even when loading a route that has to synchronously import a dynamic bundle (and the bundle does indeed get loaded dynamically after page load)
The stripped down example is here - it has the base reactQL install with the setup for react-universal-component.
Not sure exactly what the issue is, and would appreciate if you could point me in the right direction. Maybe some part of the existing reactQL setting is preventing the tracking of bundles?
The text was updated successfully, but these errors were encountered: