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
If you use mix.modules() to process assets in a sub module, and the SCSS reference images using relative paths, the final .css file will use incorrect URLs.
// Original SCSS in modules_app/myModule/resources/assets/scss/
body {
background-image: url( "../img/landscape-2.jpg" );
}
// Final CSS in modules_app/myModule/includes/css
body {
background-image: url(/includes/images/landscape-2.jpg); <-- Wrong URL. Relative URL should be preserved
I created a simple example using the coldbox-elixir template as a simple starting point. To replicate do the following:
Download my repo example
npm i
npm run dev
Look at the CSS in the modules_app/includes/css/ folder. You will also notice the images aren't copied over. I would have expected them to be copied over to modules_app_includes/img/ to follow the convention and mirror resources/assets/img.
The text was updated successfully, but these errors were encountered:
@jclausen are you able to replicate this? I've been struggling with this for a while but haven't been able to get relative links in submodules working.
I've tried messing with the config for css-loader and resolve-url-loader but the resulting css file always points to /includes/ which is not correct.
@jclausen Possibly related to #45
If you use
mix.modules()
to process assets in a sub module, and the SCSS reference images using relative paths, the final .css file will use incorrect URLs.I created a simple example using the coldbox-elixir template as a simple starting point. To replicate do the following:
npm i
npm run dev
Look at the CSS in the modules_app/includes/css/ folder. You will also notice the images aren't copied over. I would have expected them to be copied over to modules_app_includes/img/ to follow the convention and mirror resources/assets/img.
The text was updated successfully, but these errors were encountered: