-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Description
I am using a custom webpack
configuration which includes postcss-loader
. Although I enabled source maps the outputted files are not mapped correctly to the file.
Apart from that everything is working fine.
Any idea why the mapping is off? Do I have to enable another configuration?
.storybook/webpack.config.js
const path = require('path');
module.exports = {
module: {
rules: [
{
exclude: /node_modules/,
include: path.resolve(__dirname, '../'),
test: /\.css$/,
use: [
'style-loader',
{
loader: 'css-loader',
options: {
sourceMap: true,
},
},
{
loader: 'postcss-loader',
options: {
sourceMap: true,
},
},
],
},
]
}
}
./postcss.config.js
module.exports = {
plugins: {
'postcss-import': {},
'postcss-cssnext': {},
},
};
./packages/module/stories.jsx
/* eslint-disable import/no-extraneous-dependencies */
import React from 'react';
import { storiesOf } from '@storybook/react';
/* eslint-enable */
import './index.css';
storiesOf('Anchor', module)
.addWithStaticMarkup('default', () => (
<a href="#">Anchor</a>
));