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
$ yarn run dev
yarn run v1.13.0
$ nodemon src/server/main.js
[nodemon] 1.19.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `babel-node src/server/main.js`
Server started http://localhost:9000
Navigate to localhost:9000 in a browser and observe the error:
Invariant Violation: loadable: cannot find G-file in stats
at invariant (/Users/akagomez/Code/smooth-code/loadable-components/packages/component/dist/loadable.cjs.js:13:15)
at ChunkExtractor.getChunkGroup (/Users/akagomez/Code/smooth-code/loadable-components/packages/server/lib/ChunkExtractor.js:188:36)
at one (/Users/akagomez/Code/smooth-code/loadable-components/packages/server/lib/ChunkExtractor.js:211:31)
at chunk (/Users/akagomez/Code/smooth-code/loadable-components/packages/server/lib/ChunkExtractor.js:38:70)
at arrayMap (/Users/akagomez/Code/smooth-code/loadable-components/node_modules/lodash/_arrayMap.js:16:21)
at map (/Users/akagomez/Code/smooth-code/loadable-components/node_modules/lodash/map.js:50:10)
at flatMap (/Users/akagomez/Code/smooth-code/loadable-components/node_modules/lodash/flatMap.js:26:22)
at getAssets (/Users/akagomez/Code/smooth-code/loadable-components/packages/server/lib/ChunkExtractor.js:38:52)
at ChunkExtractor.getChunkAssets (/Users/akagomez/Code/smooth-code/loadable-components/packages/server/lib/ChunkExtractor.js:221:14)
at ChunkExtractor.getMainAssets (/Users/akagomez/Code/smooth-code/loadable-components/packages/server/lib/ChunkExtractor.js:304:25)
Confirm the chunk name referenced at runtime is missing from the build:
🐛 Bug Report
Dynamic imports without a static directory name result in mismatched chunk names.
A reproduction of #220
To Reproduce
Import a file dynamically relative to the current module in a directly descendant child directory:
Expected behavior
The chunk name created at build time should match the chunk name referenced at runtime.
Link to repl or repo (highly encouraged)
Clone the forked loadable-components repo
Checkout the branch
chunk-name-mismatch-bug
Run
yarn install && yarn run build
,Navigate to
examples/server-side-rendering
Run
yarn install
Run the example:
Navigate to
localhost:9000
in a browser and observe the error:Confirm the chunk name referenced at runtime is missing from the build:
Confirm the chunk name referenced at runtime is missing from
loadable-stats.json
:The text was updated successfully, but these errors were encountered: