Skip to content

Instantly share code, notes, and snippets.

@milkmidi
Created June 29, 2018 23:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save milkmidi/e1693eb1434f16ae7253f364e4282386 to your computer and use it in GitHub Desktop.
Save milkmidi/e1693eb1434f16ae7253f364e4282386 to your computer and use it in GitHub Desktop.
webpack4 stylus config
{
test: /\.(styl|stylus)$/,
use: [
{
loader: 'vue-style-loader',
},
{
loader: 'css-loader',
options: {
sourceMap: true,
minimize: true,
},
},
{
loader: 'postcss-loader',
options: {
sourceMap: true,
plugins: () => [
require('postcss-flexbugs-fixes'),
require('autoprefixer')({
browsers: [
'last 5 versions',
'iOS >=10',
'not ie < 9',
'>3%',
],
flexbox: 'no-2009',
}),
],
},
},
{
loader: 'stylus-loader',
options: {
paths: ['src/css/', 'src/asset/', 'src/'],
sourceMap: true,
import: [path.resolve('src/css/common.styl')], // <-- add this
},
},
],
exclude: /node_modules/,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment