Skip to content

Commit

Permalink
add the required polyfills so jest-mock doesn't cause angular to fail…
Browse files Browse the repository at this point in the history
… building
  • Loading branch information
ndelangen committed Jun 8, 2023
1 parent 8b8b293 commit 68519b1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions code/builders/builder-webpack5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
"babel-plugin-named-exports-order": "^0.0.2",
"browser-assert": "^1.2.1",
"case-sensitive-paths-webpack-plugin": "^2.4.0",
"constants-browserify": "^1.0.0",
"css-loader": "^6.7.1",
"express": "^4.17.3",
"fork-ts-checker-webpack-plugin": "^8.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,13 @@ export default async (
mainFields: ['browser', 'module', 'main'].filter(Boolean),
alias: storybookPaths,
fallback: {
stream: false,
path: require.resolve('path-browserify'),
assert: require.resolve('browser-assert'),
util: require.resolve('util'),
url: require.resolve('url'),
fs: false,
constants: require.resolve('constants-browserify'),
},
// Set webpack to resolve symlinks based on whether the user has asked node to.
// This feels like it should be default out-of-the-box in webpack :shrug:
Expand Down
1 change: 1 addition & 0 deletions code/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5898,6 +5898,7 @@ __metadata:
babel-plugin-named-exports-order: ^0.0.2
browser-assert: ^1.2.1
case-sensitive-paths-webpack-plugin: ^2.4.0
constants-browserify: ^1.0.0
css-loader: ^6.7.1
express: ^4.17.3
fork-ts-checker-webpack-plugin: ^8.0.0
Expand Down

0 comments on commit 68519b1

Please sign in to comment.