Skip to content

Commit

Permalink
Ensure that source for the playground can be presented in Storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
gziolo committed Oct 31, 2019
1 parent bf5463f commit 37aee14
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
3 changes: 1 addition & 2 deletions storybook/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ addDecorator( withA11y );
addDecorator( withKnobs );
configure(
[
require.context( './docs/', true, /\/.+\.mdx$/ ),
require.context( './playground/', true, /index\.js$/ ),
require.context( './stories/', true, /\/.+\.(js|mdx)$/ ),
require.context( '../packages/components/src/', true, /\/stories\/.+\.js$/ ),
],
module
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
23 changes: 12 additions & 11 deletions storybook/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
const path = require( 'path' );

module.exports = ( { config } ) => {
config.module.rules.push( {
test: /\/stories\/.+\.js$/,
loaders: [ require.resolve( '@storybook/source-loader' ) ],
enforce: 'pre',
} );

config.module.rules.push( {
test: /\.scss$/,
use: [ 'style-loader', 'css-loader', 'sass-loader' ],
include: path.resolve( __dirname, './playground' ),
} );
config.module.rules.push(
{
test: /\/stories\/.+\.js$/,
loaders: [ require.resolve( '@storybook/source-loader' ) ],
enforce: 'pre',
},
{
test: /\.scss$/,
use: [ 'style-loader', 'css-loader', 'sass-loader' ],
include: path.resolve( __dirname ),
}
);

return config;
};

0 comments on commit 37aee14

Please sign in to comment.