Skip to content

Commit

Permalink
refactor(@angular-devkit/build-angular): disable requireContext par…
Browse files Browse the repository at this point in the history
…sing

`require.context` is a webpack specific feature which was only needed to support the old Karma test setup.

BREAKING CHANGE: `require.context` are no longer parsed. Webpack specific features are not supported nor guaranteed to work in the future.
  • Loading branch information
alan-agius4 committed Sep 26, 2022
1 parent 766d4a0 commit f393b09
Showing 1 changed file with 1 addition and 2 deletions.
Expand Up @@ -342,8 +342,7 @@ export async function getCommonConfig(wco: WebpackConfigOptions): Promise<Config
strictExportPresence: true,
parser: {
javascript: {
// TODO(alanagius): disable the below once we have a migration to remove `require.context` from test.ts file in users projects.
requireContext: true,
requireContext: false,
// Disable auto URL asset module creation. This doesn't effect `new Worker(new URL(...))`
// https://webpack.js.org/guides/asset-modules/#url-assets
url: false,
Expand Down

0 comments on commit f393b09

Please sign in to comment.