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
To be honest, I am not sure what to ask, let me explain it.
I created a new Eleventy + Webpack starter template based on my last project, you can see it here . It was run smoothly, but I couldn't figure out one problem.
npm run dev
The first time you run npm run dev:
Eleventy will run eleventy --serve --incremental
Webpack
Process the assets
Generate manifest.json under _data and print the asset url.
If you see the base.njk layout, to load the assets I am using this
Eleventy seems run before Webpack generate the new manifest.json. But, if you re-run npm run build, Eleventy can read manifest.json correctly.
Quick note, sometimes, if you run npm run build, Eleventy can read manifest.json correctly, but if you re-run npm run dev, Eleventy still use the old file name.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
To be honest, I am not sure what to ask, let me explain it.
I created a new Eleventy + Webpack starter template based on my last project, you can see it here . It was run smoothly, but I couldn't figure out one problem.
npm run dev
The first time you run
npm run dev:eleventy --serve --incrementalmanifest.jsonunder_dataand print the asset url.If you see the
base.njklayout, to load the assets I am using thisEverything is working as expected.
npm run build
Now, if you run
npm run buildto build the website and the assets.eleventymanifest.jsonto the_datafolder.The expected result would be
HTML
manifest.json
{ "frontend.css": "frontend.d07cd5a645.css", }But what I see was
HTML
Currently it read the old file name.
manifest.json
{ "frontend.css": "frontend.d07cd5a645.css", }Eleventy seems run before Webpack generate the new
manifest.json. But, if you re-runnpm run build, Eleventy can readmanifest.jsoncorrectly.Quick note, sometimes, if you run
npm run build, Eleventy can readmanifest.jsoncorrectly, but if you re-runnpm run dev, Eleventy still use the old file name.Can someone help me with this?
Beta Was this translation helpful? Give feedback.
All reactions