Created
June 29, 2018 23:58
-
-
Save milkmidi/e1693eb1434f16ae7253f364e4282386 to your computer and use it in GitHub Desktop.
webpack4 stylus config
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
{ | |
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