Skip to content

Commit

Permalink
resolves Issues #45 #46 #47 - relative pathing
Browse files Browse the repository at this point in the history
  • Loading branch information
jclausen committed Feb 22, 2023
1 parent a143d52 commit 4c6364a
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/utils/cssLoaders.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ module.exports = function cssLoaders(options = {}) {
const resolveUrlLoader = {
loader: "resolve-url-loader",
options: {
removeCR: true,
root: global.elixir.rootPath
removeCR: true
}
};

Expand Down Expand Up @@ -52,7 +51,7 @@ module.exports = function cssLoaders(options = {}) {
}

if( loader == 'sass' ){
def.options[ "implementation" ] = require( "sass" );
def.options[ "implementation" ] = "sass";
}

loaders.push( def );
Expand All @@ -61,7 +60,14 @@ module.exports = function cssLoaders(options = {}) {
// Extract CSS when that option is specified
// (which is the case during production build)
if (options.extract) {
return [MiniCssExtractPlugin.loader].concat(loaders);
let miniLoader = {
loader: MiniCssExtractPlugin.loader,
options: {
// Ensure
publicPath: '../../',
}
};
return [ miniLoader ].concat(loaders);
} else {
return loaders;
}
Expand Down

0 comments on commit 4c6364a

Please sign in to comment.