-
-
Save bholloway/68ac1225b633cfc79ca5572232ae2995 to your computer and use it in GitHub Desktop.
sass-loader@6.0.0 source-map issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
const path = require("path"); | |
const ExtractTextPlugin = require("extract-text-webpack-plugin"); | |
const sassLoader = require.resolve("../../lib/loader"); | |
const extractSass = new ExtractTextPlugin({ | |
filename: "[name].[contenthash].css", | |
disable: false | |
}); | |
module.exports = { | |
entry: path.resolve(__dirname, "../scss/bootstrap-sass.scss"), | |
output: { | |
path: path.resolve(__dirname, "../output"), | |
filename: "bundle.bootstrap-sass.js" | |
}, | |
devtool: "source-map", | |
module: { | |
rules: [{ | |
test: /\.scss$/, | |
use: extractSass.extract({ | |
loader: [{ | |
loader: "css-loader", | |
options: { | |
sourceMap: true | |
} | |
}, { | |
loader: 'adjust-sourcemap-loader', options: { | |
debug: true, | |
format: false//'absolute' | |
} | |
}, { | |
loader: sassLoader, | |
options: { | |
sourceMap: true, | |
includePaths: [ | |
path.resolve(__dirname, "../scss/from-include-path") | |
] | |
} | |
}], | |
fallbackLoader: "style-loader" | |
}) | |
}, { | |
test: /\.woff2?$|\.ttf$|\.eot$|\.svg$/, | |
use: [{ | |
loader: "file-loader" | |
}] | |
}] | |
}, | |
plugins: [ | |
extractSass | |
] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment