kriasoft / kriasoft/react-firebase-starter

Example of pages.json with different chunk name.

Open
#188 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
4.5k
Forks
752
PR merge metrics
No merged PRs in 30d

Description

I have added a route to routes.json
```
{
"path": "/comp",
"page": "./pages/comp",
"chunk": "component"
},
```

and a corresponding

```
entry: {
vendor: Object.keys(pkg.dependencies),
main: [
/* The main entry point of your JavaScript application */
'./main.js'
],
component: ['./component.js']
},
```

to my webpack.config.js

however this is not working for me. I get the following error:

```
bootstrap 4ca1285…:614
GET http://localhost:3000/dist/2.js?7af7c06741b9af9b3f47
requireEnsure @ bootstrap 4ca1285…:614
ensure @ bootstrap 4ca1285…:136
(anonymous function) @ routes.json:109
F @ _export.js:35
load @ routes.json:107
_loop @ router.js:82
resolve @ router.js:52
render @ main.js:52
951 @ main.js:60
__webpack_require__ @ bootstrap 4ca1285…:585
fn @ bootstrap 4ca1285…:109
0 @ main.js?4ca1285…:6
__webpack_require__ @ bootstrap 4ca1285…:585
webpackJsonpCallback @ bootstrap 4ca1285…:21
(anonymous function) @ main.js?4ca1285…:1
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by comparing the route entry in routes.json with the component entry in webpack.config.js and reproduce the failed request for /dist/2.js. Check how the component route and chunk are expected to be named, then verify that loading /comp completes without the shown error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, webpack
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.