Created
September 6, 2018 17:21
-
-
Save tdjsnelling/863f8686ebccfd26dcacd7aa815996fc to your computer and use it in GitHub Desktop.
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
const { resolve } = require('path') | |
const autoprefixer = require('autoprefixer') | |
const stylusMixins = require('stylus-mixins') | |
const poststylus = require('poststylus') | |
module.exports = () => ([ | |
{ | |
loader: require.resolve('css-loader'), | |
options: { | |
minimize: true, | |
modules: true, | |
localIdentName: '[name]__[local]--[hash:base64:5]' | |
} | |
}, | |
{ | |
loader: require.resolve('stylus-loader'), | |
options: { | |
use: [ | |
stylusMixins(), | |
poststylus([ autoprefixer ]) | |
] | |
} | |
} | |
]) |
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
const path = require('path') | |
const createStylusLoader = require('../config/stylus-loader') | |
module.exports = { | |
module: { | |
rules: [ | |
{ | |
test: /\.styl$/, | |
use: [ require.resolve('style-loader'), ...createStylusLoader() ] | |
} | |
] | |
}, | |
node: { | |
fs: 'empty' | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment