Closed Yanchenyu closed 4 years ago
Hey @Yanchenyu :wave:, Thank you for opening an issue. We'll get back to you as soon as we can. Please, consider supporting us on Open Collective. We give a special attention to issues opened by backers. If you use Loadable at work, you can also ask your company to sponsor us :heart:.
Later, I noticed that several files that will be added repeatedly have a common feature, that is, they all have an attribute in their tag: data-chunk = "test1", and "test1" is exactly the current path
On the second question, I have made new progress.
I checked the source code of the package
this is index.js bundle
this is append css link tag part code:
this is append script tag part code:
the a.p is the url prefix, and it is no value , just ""
i delete the ChunkExtractor publicPath,
and only use webpack output publicPath, not '', give it some value
and it works, I checked the source code of the package again
So my guess is: can't the publicpath property of chunkextractor replace the prefixes of all chunk resource packages?
Three days later, I found an associated problem. Let's take a look at it together
https://github.com/gregberge/loadable-components/issues/557
I really like the library you made, please help me ! thank you so so much!!
🐌- one of the most detailed issues, and left without much attention :( How it's ended?
🐛 Bug Report
Hi, i have create a React SSR Project, Here are the version numbers of some tools
here are some code snippets
node part: (i used egg, just like koa2)
nunjucks templete
config/routes
Test1.jsx and Test2.jsx are very simple jsx file, just like a function component
server-side root pages/index.jsx
client-side root index.jsx
here are some webpack config
webpack.config.client
webpack.config.server
To Reproduce
Steps to reproduce the behavior:
and i released code to prod env, here are some strange phenomenon
the page has already appended script tag (common.js and test1.js) in html body, but why the html head has appended script tag (common.js and test1.js) too ? i think it should not append some tags again.
you can see the page from server side , there are no script tags in head tags, the repeat tags are appended in client side.
What's more, when I slow down the web page, it's normal again
and i refresh
it was correct show !
I have another problem: when I jump the route, the resource file corresponding to the next page will be loaded. I have configured the publicPath. Normally, the resource of the path will be loaded, but not, but only the resource of the relative path
i hope the test2.js should add the publicPath
Expected behavior
I think the correct display should be the second one above, just when i slow down the web page and refresh
i hope when i jump to the test2 page, the test2.js should add the publicPath in src.
That's my question. I hope I can get your help. Thank you very much