chore: making some more progress!

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2021-04-13 15:25:14 +02:00
parent 10eb151a36
commit fca8b49c39
2 changed files with 14 additions and 1 deletions
+1
View File
@@ -88,6 +88,7 @@
"mini-css-extract-plugin": "^0.9.0",
"ora": "^5.3.0",
"postcss": "^8.1.0",
"process": "^0.11.10",
"raw-loader": "^4.0.1",
"react": "^16.0.0",
"react-dev-utils": "^11.0.4",
+13 -1
View File
@@ -20,7 +20,7 @@ import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import ModuleScopePlugin from 'react-dev-utils/ModuleScopePlugin';
import { RunScriptWebpackPlugin } from 'run-script-webpack-plugin';
import webpack from 'webpack';
import webpack, { ProvidePlugin } from 'webpack';
import nodeExternals from 'webpack-node-externals';
import { isChildPath } from '@backstage/cli-common';
import { optimization } from './optimization';
@@ -114,6 +114,12 @@ export async function createConfig(
);
}
plugins.push(
new ProvidePlugin({
process: 'process/browser',
}),
);
plugins.push(
new webpack.EnvironmentPlugin({
APP_CONFIG: options.frontendAppConfigs,
@@ -176,6 +182,12 @@ export async function createConfig(
net: false,
tls: false,
child_process: false,
/* new ignores */
path: false,
https: false,
http: false,
util: false,
},
plugins: [
new LinkedPackageResolvePlugin(paths.rootNodeModules, externalPkgs),