Skip to content

Commit

Permalink
chore(storybook): scrape more stories, turnoff esm
Browse files Browse the repository at this point in the history
  • Loading branch information
germanferrero committed Apr 21, 2021
1 parent 081c8c0 commit efdb02c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ const transformConfig = require('preact-cli/lib/lib/webpack/transform-config');
const webpack = require('webpack');

module.exports = {
stories: ['../stories/**/*.stories.js', '../plugins/**/*.stories.js'],
stories: ['../stories/**/*stories.js', '../plugins/**/*stories.js'],
addons: ['@storybook/addon-actions', '@storybook/addon-knobs', '@storybook/addon-essentials'],
webpackFinal: async(config, {configType}) => {
const isProd = configType === 'PRODUCTION';
const cwd = process.env.PWD;
const src = resolve(cwd, 'src');
const source = (dir) => resolve(cwd, 'src', dir);
const env = { isProd, isWatch: !isProd, cwd, src, source, config: 'preact.config.js', esm:true};
const env = { isProd, isWatch: !isProd, cwd, src, source, config: 'preact.config.js', esm:false };
preactConfig = await clientConfig(env);
await transformConfig(env, preactConfig);
if (isProd) {
Expand Down

0 comments on commit efdb02c

Please sign in to comment.