From 9b45573adc147864277dbb3e0bc532449a049bd3 Mon Sep 17 00:00:00 2001 From: turt2live Date: Mon, 29 May 2017 14:03:37 -0600 Subject: [PATCH] Make postcss happier It's still complaining about duplicate plugins, but it's a warning and not an error. --- package.json | 4 ++++ postcss.config.js | 8 ++++++++ webpack.config.js | 7 +------ 3 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 postcss.config.js diff --git a/package.json b/package.json index 64ea850..04b4d7c 100644 --- a/package.json +++ b/package.json @@ -54,6 +54,7 @@ "copy-webpack-plugin": "^4.0.1", "core-js": "^2.4.1", "css-loader": "^0.28.0", + "cssnano": "^3.10.0", "extract-text-webpack-plugin": "^2.1.0", "file-loader": "^0.11.1", "html-loader": "^0.4.5", @@ -61,7 +62,10 @@ "jquery": "^3.2.1", "json-loader": "^0.5.4", "node-sass": "^4.5.2", + "postcss-cssnext": "^2.11.0", + "postcss-import": "^10.0.0", "postcss-loader": "^2.0.5", + "postcss-scss": "^1.0.0", "raw-loader": "^0.5.1", "reflect-metadata": "^0.1.10", "rimraf": "^2.6.1", diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 0000000..7606832 --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,8 @@ +module.exports = { + parser: 'postcss-scss', + plugins: { + 'postcss-import': {}, + 'postcss-cssnext': {browsers: ['last 2 version']}, + 'cssnano': {} + } +}; \ No newline at end of file diff --git a/webpack.config.js b/webpack.config.js index 9138a61..1bbf927 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -97,12 +97,7 @@ module.exports = function () { }, sassLoader: { //includePaths: [path.resolve(__dirname, "node_modules/foundation-sites/scss")] - }, - postcss: [ - autoprefixer({ - browsers: ['last 2 version'] - }) - ] + } } }), new CommonsChunkPlugin({