Warning: React.createElement: type should not be null, undefined, boolean, or number. It should be a string (for DOM elements) or a ReactClass (for composite components).
Uncaught Error: Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.
So, my routes work when I import the components using es6 import at the top of my file. If I don’t use import and use let Component = require(‘path/to/file’) instead to import my components, it does not work and spits out those same errors. So, I actually think it’s not necessarily the code splitting that is broken, but with importing a component with require.
What are the known drawbacks of using this approach instead of Meteor 1.3?
Are there any more benefits than hot-reload in development, working SSR and code splitting (compared to Meteor 1.3)?
Does the hot-code-push still work in Cordova?
How does code splitting works in Cordova? Does it store the lazy required modules like the Meteor normal html, css y js and they work even if the user opens the app without connection or those lazy required modules are always send over the net and require connection?
@benoitt I added webpack-font-awesome npm package and it works on development environment, but when I try to build for production I get the following error saying that window is not defined. I’ve also tried removing the font-awesome package, but I still get this issue. Is there some webpack cache somewhere that I need to clear? Any thoughts?
=> Exited with code: 8
W20160203-21:39:32.903(-5)? (STDERR) C:\Users\panw\AppData\Local\.meteor\packages\meteor-tool\1.1.10\mt-os.windows.x86_32\dev_bundle\server-lib\node_modules\fibers\future.js:245
W20160203-21:39:32.904(-5)? (STDERR) throw(ex);
W20160203-21:39:32.904(-5)? (STDERR) ^
W20160203-21:39:32.904(-5)? (STDERR) ReferenceError: window is not defined
@benoitt Benoit, first of all, thanks for the great package! However, I miss the possibility to set the port through WEBPACK_PORT env variable. Could you please enable this possibility? I often run several meteor instances, so I have a script which finds free ports to run them, I would like to have the same for webpack dev server.
@benoitt I couldn’t get Webpack + babel-root-slash-import running. I’ve added it using NPM, then created the .babelrc file and added it as a plugin. But having it set up this way doesn’t change anything.