Skip to content

Commit

Permalink
"Fix" production build giving "React is not defined" errors
Browse files Browse the repository at this point in the history
  • Loading branch information
BPScott committed Dec 20, 2018
1 parent bf938b2 commit d16268d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .storybook/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ module.exports = (baseConfig, env, config) => {
loader: 'babel-loader',
options: {
babelrc: false,
// Don't use the production environment as it contains optimisations
// that break compilation. The shopify/react preset enables the
// babel-plugin-transform-react-constant-elements plugin which
// somehow hoists things up into an undesirable location.
forceEnv: env === 'PRODUCTION' ? 'not-production' : undefined,
minified: env === 'PRODUCTION',
presets: [
['shopify/web', {modules: false}],
Expand Down

0 comments on commit d16268d

Please sign in to comment.