Authored by ccbikai

postcss 插件调整

{
"extends": "yoho"
"extends": "yoho",
"plugins": ["html"]
}
... ...
... ... @@ -57,6 +57,7 @@
"css-loader": "^0.23.1",
"eslint": "^3.0.1",
"eslint-config-yoho": "^1.0.1",
"eslint-plugin-html": "^1.5.1",
"gulp": "^3.9.1",
"gulp-cssnano": "^2.1.2",
"gulp-ftp": "^1.1.0",
... ...
... ... @@ -181,7 +181,10 @@ gulp.task('webpack-dev-server', () => {
debug: true,
vue: {
postcss: postcssPlugin(env.dev),
autoprefixer: false
autoprefixer: false,
loaders: {
css: 'vue-style-loader!css-loader?sourceMap&-url'
}
}
});
... ...
<template>
<div class="test">
{{message}}
<div class="test2"></div>
</div>
<div class="test2">
{{message2}}
</div>
</template>
... ... @@ -10,7 +11,8 @@
module.exports = {
data: function() {
return {
message: 'test'
message: 'test',
message2: 'test2'
}
}
}
... ... @@ -19,10 +21,11 @@
<style>
.test {
color: green;
background: url("/channel/boys.png");
}
.test2 {
background: #000;
display: flex;
}
.test2 {
color: blue;
background: resolve("channel/boys.png");
}
</style>
\ No newline at end of file
... ...