Closed anh-dinh-jh closed 2 years ago
@anh-dinh-jh thanks for reporting this. We have had a vacation season, which caused some lag in responses on our part.
Anyway, we decided that it's better not to branch out from CRA too much since there's been a discussion of reintroducing this to CRA too. So, at this point, we decided to remove splitChunks again.
The fix is not yet fully released, but here's a candidate: https://github.com/sharetribe/create-react-app/pull/25
Now the sharetribe-scripts v6.0.1 is released and taken into use on the master branch of FTW-daily.
A new release is made with the updated sharetribe-scripts. I'm closing this issue.
Describe the bug Got error:
routeConfiguration is not a function
To Reproduce Steps to reproduce the behavior:
async
to any thunk in *.duck.js, for example:searchListings
inSearchPage.duck.js
yarn build
oryarn dev-server
Expected behavior It should work normally as expected
Causes In CRA v5.0, FB had already deleted the
splitChunks
part. Then that part was added again in this PR, which causes an error. Because by using webpack5.0, whenever we putasync
before any thunk, themain
file will be split into 2 files 210.*.js and main.*.js. The210
is placed before themain
and thenloadable-server
-requireEntrypoint
could only get the first one (210) to build.Possible solutions
Change
splitChunks
fromall
toasync
Add the property
name
and valuemain
Remove it again and make it as same as default