-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX storybook webpack setup HMR; partial downgrade back to v4.0.4
- Loading branch information
1 parent
b12ddaa
commit a4ef4b0
Showing
2 changed files
with
15 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,16 @@ | ||
const merge = require('webpack-merge'); | ||
|
||
const webpackProjectConfig = require('../webpack.common'); | ||
// | ||
// you can use this file to add your custom webpack plugins, loaders and anything you like. | ||
// This is just the basic way to add additional webpack configurations. | ||
// For more information refer the docs: https://storybook.js.org/configurations/custom-webpack-config | ||
|
||
// | ||
// IMPORTANT | ||
// When you add this file, we won't add the default configurations which is similar | ||
// to "React Create App". This only has babel loader to load JavaScript. | ||
const webpackProjectConfig = require('../webpack.common'); | ||
|
||
module.exports = { | ||
plugins: webpackProjectConfig.plugins, | ||
module: { | ||
rules: [ | ||
// add your custom rules. | ||
], | ||
}, | ||
externals: { | ||
'jsdom': 'window', | ||
'cheerio': 'window', | ||
'react/lib/ExecutionEnvironment': true, | ||
'react/lib/ReactContext': 'window', | ||
'react/addons': true, | ||
} | ||
}; | ||
module.exports = (storybookBaseConfig, configType) => { | ||
return merge.smart(storybookBaseConfig, { | ||
plugins: webpackProjectConfig.plugins | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters