Skip to content

Instantly share code, notes, and snippets.

@cacheflow
Created December 21, 2018 18:53
Show Gist options
  • Save cacheflow/cf186932907e2a97409bf06555bb5902 to your computer and use it in GitHub Desktop.
Save cacheflow/cf186932907e2a97409bf06555bb5902 to your computer and use it in GitHub Desktop.
const { environment } = require('@rails/webpacker')
const cssLoaderOptions = {
sourceMap: true,
importLoaders: 2,
modules: false
};
environment.loaders.get('css').use.find(el => el.loader === "css-loader").options = cssLoaderOptions;
environment.loaders
.get("sass")
.use.find(el => el.loader === "css-loader").options = cssLoaderOptions;
environment.loaders.get("sass").use.splice(-1, 0, {
loader: "resolve-url-loader",
options: {
attempts: 1
}
});
module.exports = environment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment