Authored by ccbikai

vue add postcss

@@ -67,10 +67,10 @@ app.use(session({ @@ -67,10 +67,10 @@ app.use(session({
67 domain: 'yohoblk.com', 67 domain: 'yohoblk.com',
68 httpOnly: false 68 httpOnly: false
69 }, 69 },
70 - store: new MemcachedStore({  
71 - hosts: config.memcache.session,  
72 - prefix: 'yohoblk_session:'  
73 - }) 70 + // store: new MemcachedStore({
  71 + // hosts: config.memcache.session,
  72 + // prefix: 'yohoblk_session:'
  73 + // })
74 })); 74 }));
75 75
76 app.use((req, res, next) => { 76 app.use((req, res, next) => {
@@ -178,7 +178,11 @@ gulp.task('postcss', ['assets'], () => { @@ -178,7 +178,11 @@ gulp.task('postcss', ['assets'], () => {
178 // webpack dev server 178 // webpack dev server
179 gulp.task('webpack-dev-server', () => { 179 gulp.task('webpack-dev-server', () => {
180 var devConfig = Object.assign({}, webpackConfig, { 180 var devConfig = Object.assign({}, webpackConfig, {
181 - debug: true 181 + debug: true,
  182 + vue: {
  183 + postcss: postcssPlugin(env.dev),
  184 + autoprefixer: false
  185 + }
182 }); 186 });
183 187
184 new WebpackDevServer(webpack(devConfig), { 188 new WebpackDevServer(webpack(devConfig), {
@@ -201,7 +205,12 @@ gulp.task('webpack-dev-server', () => { @@ -201,7 +205,12 @@ gulp.task('webpack-dev-server', () => {
201 205
202 // webpack compile in pro 206 // webpack compile in pro
203 gulp.task('webpack', (done) => { 207 gulp.task('webpack', (done) => {
204 - const proConfig = Object.assign({}, webpackConfig); 208 + const proConfig = Object.assign({}, webpackConfig, {
  209 + vue: {
  210 + postcss: postcssPlugin(env.pro),
  211 + autoprefixer: false
  212 + }
  213 + });
205 214
206 proConfig.output.path = dist.js; 215 proConfig.output.path = dist.js;
207 216
1 <template> 1 <template>
2 <div class="test"> 2 <div class="test">
3 {{message}} 3 {{message}}
  4 +
  5 + <div class="test2"></div>
4 </div> 6 </div>
5 </template> 7 </template>
6 8
@@ -17,5 +19,10 @@ @@ -17,5 +19,10 @@
17 <style> 19 <style>
18 .test { 20 .test {
19 color: green; 21 color: green;
  22 +
  23 + .test2 {
  24 + background: #000;
  25 + display: flex;
  26 + }
20 } 27 }
21 </style> 28 </style>