1.postcss.config.js
module.exports = {
plugins: [
require('autoprefixer')({ browsers: ["last 5 versions"] })
]
}
2.webpack.config.js
module:{
rules:[
...
{test:/\.css$/,use:['style-loader', 'css-loader','postcss-loader']}]},
module.exports = {
plugins: [
require('autoprefixer')({ browsers: ["last 5 versions"] })
]
}
2.webpack.config.js
module:{
rules:[
...
{test:/\.css$/,use:['style-loader', 'css-loader','postcss-loader']}]},
2017-02-24
webpack hello.js hello.bundle.js --module-bind "css=style-loader!css-loader"
正解。切记是双引号
正解。切记是双引号
2017-02-24
webpack + angular 搭建的延迟加载 和 本地mock ,欢迎分享https://github.com/Topthinking/angular-webpack
2017-02-24
{
test: /\.css$/,
use: [
'style-loader',
{loader: 'css-loader',options: { importLoaders: 1 } },
{loader: 'postcss-loader',options: { plugins: function(){ return [require('autoprefixer')];}
}}]}]}
按webpack2配置改出来的,但总是报错:Module build failed: Error: No PostCSS Config found in...不自动匹配前缀!求解答..
test: /\.css$/,
use: [
'style-loader',
{loader: 'css-loader',options: { importLoaders: 1 } },
{loader: 'postcss-loader',options: { plugins: function(){ return [require('autoprefixer')];}
}}]}]}
按webpack2配置改出来的,但总是报错:Module build failed: Error: No PostCSS Config found in...不自动匹配前缀!求解答..
2017-02-24