Skip to content

Commit

Permalink
Merge pull request #1062 from danielduan/postcss-config
Browse files Browse the repository at this point in the history
Upgraded webpack PostCSS plugin definition
  • Loading branch information
danielduan authored May 19, 2017
2 parents 38f8e92 + 63e5dc2 commit a47d8d1
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions app/react/src/server/config/defaults/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,7 @@ import { includePaths, excludePaths } from '../utils';
// Add a default custom config which is similar to what React Create App does.
module.exports = storybookBaseConfig => {
const newConfig = { ...storybookBaseConfig };
newConfig.plugins = [
...storybookBaseConfig.plugins,
new webpack.LoaderOptionsPlugin({
options: {
postcss: [
autoprefixer({
browsers: ['>1%', 'last 4 versions', 'Firefox ESR', 'not ie < 9'],
}),
],
},
}),
];

newConfig.module.rules = [
...storybookBaseConfig.module.rules,
{
Expand All @@ -31,7 +20,16 @@ module.exports = storybookBaseConfig => {
importLoaders: 1,
},
},
'postcss-loader',
{
loader: 'postcss-loader',
options: {
plugins: () => [
autoprefixer({
browsers: ['>1%', 'last 4 versions', 'Firefox ESR', 'not ie < 9'],
}),
],
},
},
],
},
{
Expand Down

0 comments on commit a47d8d1

Please sign in to comment.