Authored by ccbikai

vue add postcss

... ... @@ -67,10 +67,10 @@ app.use(session({
domain: 'yohoblk.com',
httpOnly: false
},
store: new MemcachedStore({
hosts: config.memcache.session,
prefix: 'yohoblk_session:'
})
// store: new MemcachedStore({
// hosts: config.memcache.session,
// prefix: 'yohoblk_session:'
// })
}));
app.use((req, res, next) => {
... ...
... ... @@ -178,7 +178,11 @@ gulp.task('postcss', ['assets'], () => {
// webpack dev server
gulp.task('webpack-dev-server', () => {
var devConfig = Object.assign({}, webpackConfig, {
debug: true
debug: true,
vue: {
postcss: postcssPlugin(env.dev),
autoprefixer: false
}
});
new WebpackDevServer(webpack(devConfig), {
... ... @@ -201,7 +205,12 @@ gulp.task('webpack-dev-server', () => {
// webpack compile in pro
gulp.task('webpack', (done) => {
const proConfig = Object.assign({}, webpackConfig);
const proConfig = Object.assign({}, webpackConfig, {
vue: {
postcss: postcssPlugin(env.pro),
autoprefixer: false
}
});
proConfig.output.path = dist.js;
... ...
<template>
<div class="test">
{{message}}
<div class="test2"></div>
</div>
</template>
... ... @@ -17,5 +19,10 @@
<style>
.test {
color: green;
.test2 {
background: #000;
display: flex;
}
}
</style>
\ No newline at end of file
... ...