Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webpack5: Fix manager.js process references #17213

Merged
merged 1 commit into from Jan 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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