Skip to content

Commit

Permalink
Merge pull request #17213 from storybookjs/16067-fix-manager-process
Browse files Browse the repository at this point in the history
Webpack5: Fix manager.js process references
  • Loading branch information
shilman committed Jan 15, 2022
1 parent 3a0fd74 commit 8346850
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/manager-webpack5/src/presets/manager-preset.ts
@@ -1,6 +1,6 @@
import path from 'path';
import fse from 'fs-extra';
import { DefinePlugin, Configuration, WebpackPluginInstance } from 'webpack';
import { DefinePlugin, Configuration, WebpackPluginInstance, ProvidePlugin } from 'webpack';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin';
import VirtualModulePlugin from 'webpack-virtual-modules';
Expand Down Expand Up @@ -113,7 +113,8 @@ export async function managerWebpack(
new DefinePlugin({
...stringifyProcessEnvs(envs),
NODE_ENV: JSON.stringify(envs.NODE_ENV),
}) as WebpackPluginInstance,
}),
new ProvidePlugin({ process: 'process/browser.js' }),
// isProd &&
// BundleAnalyzerPlugin &&
// new BundleAnalyzerPlugin({ analyzerMode: 'static', openAnalyzer: false }),
Expand Down

0 comments on commit 8346850

Please sign in to comment.