Skip to content

Instantly share code, notes, and snippets.

@tdjsnelling
Created September 6, 2018 17:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tdjsnelling/863f8686ebccfd26dcacd7aa815996fc to your computer and use it in GitHub Desktop.
Save tdjsnelling/863f8686ebccfd26dcacd7aa815996fc to your computer and use it in GitHub Desktop.
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 ])
]
}
}
])
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