mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-01-08 20:17:03 +00:00
add process package it is remove in webpack5
This commit is contained in:
@@ -6,7 +6,7 @@ const MonacoWebpackPlugin = require("monaco-editor-webpack-plugin");
|
|||||||
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
||||||
const InlineChunkHtmlPlugin = require("react-dev-utils/InlineChunkHtmlPlugin");
|
const InlineChunkHtmlPlugin = require("react-dev-utils/InlineChunkHtmlPlugin");
|
||||||
const HTMLInlineCSSWebpackPlugin = require("html-inline-css-webpack-plugin").default;
|
const HTMLInlineCSSWebpackPlugin = require("html-inline-css-webpack-plugin").default;
|
||||||
const { EnvironmentPlugin } = require("webpack");
|
const { EnvironmentPlugin, ProvidePlugin } = require("webpack");
|
||||||
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
||||||
const CopyWebpackPlugin = require("copy-webpack-plugin");
|
const CopyWebpackPlugin = require("copy-webpack-plugin");
|
||||||
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
|
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
|
||||||
@@ -116,7 +116,10 @@ module.exports = function (_env = {}, argv = {}) {
|
|||||||
fileName: "version.txt",
|
fileName: "version.txt",
|
||||||
content: `${gitSha.trim()} ${new Date().toUTCString()}`,
|
content: `${gitSha.trim()} ${new Date().toUTCString()}`,
|
||||||
}),
|
}),
|
||||||
new CaseSensitivePathsPlugin(),
|
// new CaseSensitivePathsPlugin(),
|
||||||
|
new ProvidePlugin({
|
||||||
|
process: "process/browser",
|
||||||
|
}),
|
||||||
new MiniCssExtractPlugin({
|
new MiniCssExtractPlugin({
|
||||||
filename: "[name].[contenthash].css",
|
filename: "[name].[contenthash].css",
|
||||||
}),
|
}),
|
||||||
@@ -230,6 +233,9 @@ module.exports = function (_env = {}, argv = {}) {
|
|||||||
crypto: false,
|
crypto: false,
|
||||||
"crypto-browserify": require.resolve("crypto-browserify"), //if you want to use this module also don't forget npm i crypto-browserify
|
"crypto-browserify": require.resolve("crypto-browserify"), //if you want to use this module also don't forget npm i crypto-browserify
|
||||||
},
|
},
|
||||||
|
alias: {
|
||||||
|
process: "process/browser",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
optimization: {
|
optimization: {
|
||||||
minimize: mode === "production" ? true : false,
|
minimize: mode === "production" ? true : false,
|
||||||
|
|||||||
Reference in New Issue
Block a user