...
|
...
|
@@ -143,7 +143,9 @@ gulp.task('dist', ['ge'], () => { |
|
|
gulp.task('postcss-dev', () => {
|
|
|
return gulp.src('scss/index.css')
|
|
|
.pipe(sourcemaps.init())
|
|
|
.pipe(postcss(postcssPlugin(env.dev)))
|
|
|
.pipe(postcss(postcssPlugin(env.dev), {
|
|
|
parser: require('postcss-scss')
|
|
|
}))
|
|
|
.pipe(sourcemaps.write('.'))
|
|
|
.pipe(gulp.dest('css/'));
|
|
|
});
|
...
|
...
|
@@ -171,7 +173,9 @@ gulp.task('font', () => { |
|
|
// postcss compile in pro
|
|
|
gulp.task('postcss', ['assets'], () => {
|
|
|
return gulp.src('scss/index.css')
|
|
|
.pipe(postcss(postcssPlugin(env.pro)))
|
|
|
.pipe(postcss(postcssPlugin(env.pro), {
|
|
|
parser: require('postcss-scss')
|
|
|
}))
|
|
|
.pipe(cssnano({
|
|
|
safe: true
|
|
|
}))
|
...
|
...
|
@@ -183,7 +187,12 @@ gulp.task('webpack-dev-server', () => { |
|
|
const devConfig = Object.assign({}, webpackConfig, {
|
|
|
devtool: '#inline-source-map',
|
|
|
vue: {
|
|
|
postcss: postcssPlugin(env.dev),
|
|
|
postcss: {
|
|
|
plugins: postcssPlugin(env.dev),
|
|
|
options: {
|
|
|
parser: require('postcss-scss')
|
|
|
}
|
|
|
},
|
|
|
autoprefixer: false,
|
|
|
loaders: {
|
|
|
css: ExtractTextPlugin.extract(['css?-url'])
|
...
|
...
|
@@ -213,7 +222,12 @@ gulp.task('webpack-dev-server', () => { |
|
|
gulp.task('webpack', ['assets'], (done) => {
|
|
|
const proConfig = Object.assign({}, webpackConfig, {
|
|
|
vue: {
|
|
|
postcss: postcssPlugin(env.pro),
|
|
|
postcss: {
|
|
|
plugins: postcssPlugin(env.dev),
|
|
|
options: {
|
|
|
parser: require('postcss-scss')
|
|
|
}
|
|
|
},
|
|
|
autoprefixer: false,
|
|
|
loaders: {
|
|
|
css: ExtractTextPlugin.extract(['css?-url'])
|
...
|
...
|
|