require.import()
add require.import
to your list of babel plugins.
usage
require
import()
/require.ensure()
?
why not tl;dr - fixes this issue
when using with ssr
you need to make sure that you insert content into your html in the following order -
- server side rendered html
- main bundle
- chunks required for the given html (use predictable chunk names to make this easier)
- a snippet to start the whole app