Skip to content

Commit

Permalink
Fix how publicPath is prepended to the bundle file name
Browse files Browse the repository at this point in the history
  • Loading branch information
KidkArolis committed Feb 6, 2022
1 parent e14af4e commit 83cec6b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ module.exports = function options(command = 'dev', program = {}) {

// url paths to all of the entrypoints files to be embedded into the html
assets: {
js: [path.join(publicPath, target.modern ? 'bundle.js' : 'bundle.legacy.js')],
js: [publicPath + (target.modern ? 'bundle.js' : 'bundle.legacy.js')],
css: [],
runtime: [],
other: []
Expand Down Expand Up @@ -234,7 +234,7 @@ function assets({ publicPath, entrypoints }) {
// where we inline the runtime, outpu css as link tags
// and js as script tags
entrypoints.bundle.assets.forEach(({ name: asset }) => {
const assetPath = path.join(publicPath, asset)
const assetPath = publicPath + asset
if (asset.startsWith('runtime~bundle') && asset.endsWith('.js')) {
runtime.push(assetPath)
} else if (asset.endsWith('.js')) {
Expand Down

0 comments on commit 83cec6b

Please sign in to comment.