zikaari / css-visor

Webpack supervisor to inject and hot update stylesheets with sourcemaps
MIT License
8 stars 1 forks source link

Add pathPrefix option #2

Closed jamietre closed 6 years ago

jamietre commented 6 years ago

This option allows appending a prefix to the paths generated by css-visor for the assets its creates.

In our build configuration, the paths used at runtime to load assets may be different from the root paths within the source tree. For example, styles are always loaded from within a /styles/ route, which won't work by default with css-visor which always emits routes relative to the site source root folder name. This change allows aligning the output from css-visor to an arbitrary route at runtime.

zikaari commented 6 years ago

Thanks!

Also do you (or your team) use any CLI tools like angular-cli or create-react-app which have no or pathetic support for CSS sourcemaps, or you guys use your own setup from scratch?

(The reason I'm asking this is because I'm trying hard to push this plugin to those CLI tools, for better sourcemap support, example https://github.com/facebookincubator/create-react-app/pull/3202 with support for others coming soon)