From 34752b238d3edeac5d4dfd41d797eb32337c806a Mon Sep 17 00:00:00 2001 From: Micooz Date: Thu, 27 Jul 2017 21:21:43 +0800 Subject: [PATCH] build: move postcss.config.js to webpack, fix autoprefixer --- postcss.config.js | 5 ----- webpack/dev.config.js | 4 +++- webpack/postcss.config.js | 5 +++++ webpack/prod.config.js | 4 +++- 4 files changed, 11 insertions(+), 7 deletions(-) delete mode 100644 postcss.config.js create mode 100644 webpack/postcss.config.js diff --git a/postcss.config.js b/postcss.config.js deleted file mode 100644 index 134417d..0000000 --- a/postcss.config.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - plugins: [ - require('autoprefixer') - ] -} \ No newline at end of file diff --git a/webpack/dev.config.js b/webpack/dev.config.js index d2dad16..29c85ec 100644 --- a/webpack/dev.config.js +++ b/webpack/dev.config.js @@ -58,7 +58,9 @@ module.exports = { { loader: require.resolve('postcss-loader'), options: { - ident: 'postcss' + config: { + path: path.join(__dirname, 'postcss.config.js') + } } }, require.resolve('sass-loader') diff --git a/webpack/postcss.config.js b/webpack/postcss.config.js new file mode 100644 index 0000000..7821776 --- /dev/null +++ b/webpack/postcss.config.js @@ -0,0 +1,5 @@ +module.exports = { + plugins: { + 'autoprefixer': {} + } +}; \ No newline at end of file diff --git a/webpack/prod.config.js b/webpack/prod.config.js index 17749d1..92f3907 100644 --- a/webpack/prod.config.js +++ b/webpack/prod.config.js @@ -65,7 +65,9 @@ module.exports = { { loader: require.resolve('postcss-loader'), options: { - ident: 'postcss' + config: { + path: path.join(__dirname, 'postcss.config.js') + } } }, require.resolve('sass-loader')