Skip to content

Commit

Permalink
updates for pixrem [appends #247]
Browse files Browse the repository at this point in the history
  • Loading branch information
bignamehere committed Jun 13, 2018
1 parent 7efcc45 commit 4a1a4ef
Show file tree
Hide file tree
Showing 4 changed files with 496 additions and 506 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"webpack-merge": "^4.1.2"
},
"dependencies": {
"html-beautify-webpack-plugin": "^1.0.5"
"html-beautify-webpack-plugin": "^1.0.5",
"pixrem": "^4.0.1"
}
}
14 changes: 6 additions & 8 deletions webpack.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
const path = require('path');
const webpack = require('webpack');
const autoprefixer = require('autoprefixer');
const pixrem = require('pixrem');
const merge = require('webpack-merge');
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
var StyleLintPlugin = require('stylelint-webpack-plugin');
Expand Down Expand Up @@ -35,14 +36,11 @@ module.exports = merge(common, {
{
loader: 'postcss-loader',
options: {
sourceMap: true,
plugins() {
return [autoprefixer(
{
grid: true
}
)];
}
plugins: () => [
pixrem ({unitPrecision: 3}),
autoprefixer ({grid: true})
],
sourceMap: true
}
},
'sass-loader'
Expand Down
16 changes: 9 additions & 7 deletions webpack.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
//
const webpack = require('webpack');
const autoprefixer = require('autoprefixer');
const pixrem = require('pixrem');
const merge = require('webpack-merge');
const path = require('path');
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
Expand All @@ -13,6 +14,10 @@ module.exports = merge(common, {

mode: 'production',

optimization: {
minimize: true
},

output: {
path: path.resolve('./dist'),
filename: '[name].bundle.js'
Expand All @@ -32,13 +37,10 @@ module.exports = merge(common, {
{
loader: 'postcss-loader',
options: {
plugins() {
return [autoprefixer(
{
grid: true
}
)];
},
plugins: () => [
pixrem ({unitPrecision: 3}),
autoprefixer ({grid: true})
],
sourceMap: true
}
},
Expand Down
Loading

0 comments on commit 4a1a4ef

Please sign in to comment.