Skip to content

Commit

Permalink
Merge pull request michalsnik#130 from UltimateDesignCombatant/webpac…
Browse files Browse the repository at this point in the history
…k-prefix-config

Adding autoprefixer support to webpack build
  • Loading branch information
michalsnik committed May 26, 2017
2 parents 71462cb + b167c7b commit daf81b0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"url": "https://github.com/michalsnik/aos/issues"
},
"devDependencies": {
"autoprefixer": "^6.7.7",
"babel-core": "^6.9.1",
"babel-loader": "^6.2.4",
"babel-plugin-transform-object-assign": "^6.8.0",
Expand Down
8 changes: 7 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
var webpack = require('webpack');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var autoprefixer = require('autoprefixer');

module.exports = {
entry: './src/js/aos.js',
Expand All @@ -23,10 +24,15 @@ module.exports = {
},
{
test: /\.scss$/,
loader: ExtractTextPlugin.extract("style-loader", "css-loader?sourceMap!sass-loader")
loader: ExtractTextPlugin.extract("style-loader", "css-loader?sourceMap!sass-loader!postcss-loader")
}
]
},
postcss: function (webpack) {
return [
autoprefixer
];
},
plugins: [
new ExtractTextPlugin('aos.css'),
new webpack.optimize.UglifyJsPlugin()
Expand Down

0 comments on commit daf81b0

Please sign in to comment.