fix(postcss): fix postcss config for storybook

This commit is contained in:
Rui Saraiva 2020-09-10 18:56:18 +01:00
parent a9b688dff8
commit e251d361f6
3 changed files with 15 additions and 22 deletions

View File

@ -2,11 +2,8 @@ const path = require('path')
// Export a function. Accept the base config as the only param.
module.exports = {
webpackFinal: async (baseConfig) => {
const nextConfig = require('../next.config.js')
// Make whatever fine-grained changes you need
baseConfig.module.rules.push({
webpackFinal: async (config) => {
config.module.rules.push({
test: /\.scss$/,
use: [
'style-loader',
@ -23,6 +20,6 @@ module.exports = {
})
// merge whatever from nextConfig into the webpack config storybook will use
return { ...baseConfig }
return config
},
}

View File

@ -245,7 +245,6 @@
}
strong {
// padding: 0 4px;
font-weight: 700;
}
}

View File

@ -1,10 +1,8 @@
module.exports = {
plugins: [
'postcss-100vh-fix',
'postcss-flexbugs-fixes',
[
'postcss-preset-env',
{
plugins: {
'postcss-100vh-fix': {},
'postcss-flexbugs-fixes': {},
'postcss-preset-env': {
autoprefixer: {
flexbox: 'no-2009',
},
@ -13,6 +11,5 @@ module.exports = {
'custom-properties': false,
},
},
],
],
},
}