Skip to content

Commit

Permalink
fix(build): added autoprefixer to prod
Browse files Browse the repository at this point in the history
  • Loading branch information
grizzm0 authored and MRHarrison committed Feb 9, 2017
1 parent e48dd6e commit 6e1a89b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/angular-cli/models/webpack-build-common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import {BaseHrefWebpackPlugin} from '@angular-cli/base-href-webpack';

const ProgressPlugin = require('webpack/lib/ProgressPlugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const autoprefixer = require('autoprefixer');


export function getWebpackCommonConfig(
projectRoot: string,
Expand Down Expand Up @@ -138,7 +136,9 @@ export function getWebpackCommonConfig(
new webpack.LoaderOptionsPlugin({
test: /\.(css|scss|sass|less|styl)$/,
options: {
postcss: [ autoprefixer() ]
postcss: [
require('autoprefixer')
]
},
})
].concat(extraPlugins),
Expand Down
2 changes: 2 additions & 0 deletions packages/angular-cli/models/webpack-build-production.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,10 @@ export const getWebpackProdConfigPartial = function(projectRoot: string,
threshold: 10240
}),
new webpack.LoaderOptionsPlugin({
test: /\.(css|scss|sass|less|styl)$/,
options: {
postcss: [
require('autoprefixer'),
require('postcss-discard-comments')
]
}
Expand Down

0 comments on commit 6e1a89b

Please sign in to comment.