question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

respect publicPath

See original GitHub issue

It would be great if this plugin respected the publicPath setting in output. Currently the service worker and manifest directory needs to be published at / which sometimes is not possible, for example on gh-pages.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:16 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
NekRcommented, Nov 21, 2015

The scope should do exactly what you want, however, I agree that having it as a separate settings might not be always good and that it may introduce some confusing like here. I am going to mark this for v2, but in mean time, this should work:

// webpack.config.js

module.exports = {
  output: {
    publicPath: '/myApp/'
  },
  plugins: [
   new OfflinePlugin({
     scope: '/myApp/'
   })
  ]
};

Also it should support __webpack_public_path__ in future, I think.

0reactions
developdeezcommented, Feb 4, 2020

@amiuhle Did you solve this issue? It’s preventing webpack from even including my assests

Read more comments on GitHub >

github_iconTop Results From Across the Web

'next build' not respecting publicPath property in webpack config
I am setting a publicPath property as part of the output but when I later run npm run build which triggers a next...
Read more >
Public Path - webpack
The publicPath configuration option can be quite useful in a variety of scenarios. It allows you to specify the base path for all...
Read more >
Configuration Reference | Vue CLI
This allows the built bundle to be deployed under any public path, or used in a file system based environment like a Cordova...
Read more >
API - esbuild
... Preserve symlinks; Public path; Pure; Resolve extensions; Source root ... This setting is a convention from Webpack that esbuild respects for any ......
Read more >
Font URLs are not respecting the public path when compiling ...
Font URLs are not respecting the public path when compiling Sass. I use an public/assets folder for all my assets, but when I'm...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found