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
feat(@schematics/angular): add migration to remove require calls from karma builder main file #23955
Conversation
@@ -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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this is not an officially supported feature, we might want to add a breaking change notice to let users know that this Webpack specific feature will definitely not work anymore. (And maybe reiterate that Webpack specific features are not guaranteed to work in the future.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let’s do that.
5e9ddc3
to
1e56809
Compare
… karma builder main file With the recent changes in build-angular the `require.context` calls have become unneeded.
…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.
1e56809
to
578eb3d
Compare
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
With the recent changes in build-angular the
require.context
calls have become unneeded.BREAKING CHANGE:
require.context
are no longer parsed. Webpack specific features are not supported nor guaranteed to work in the future.