1
1
mirror of https://github.com/primer/css.git synced 2024-12-25 07:03:35 +03:00

add postcss and sass loader options

This commit is contained in:
Shawn Allen 2017-08-17 16:25:33 -07:00
parent 7cf0230b74
commit 75fb852648

View File

@ -1,13 +1,34 @@
const path = require('path'); const path = require("path");
const modulesPath = path.resolve(__dirname, "../modules")
module.exports = { module.exports = {
module: { module: {
rules: [ rules: [
{ {
test: /\.scss$/, test: /\.scss$/,
loaders: ["style-loader", "css-loader", "postcss-loader", "sass-loader"], loaders: [
include: path.resolve(__dirname, '../modules') "style-loader",
"css-loader",
{
loader: "postcss-loader",
options: {
config: {
path: require.resolve("./postcss.config.js"),
},
},
},
{
loader: "sass-loader",
options: {
includePaths: [
modulesPath,
],
}
},
],
include: modulesPath,
} }
] ]
} },
} }