Skip to content
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

Avoid bundling the mock interceptor in prod env #448

Merged

Conversation

hannaeko
Copy link
Member

@hannaeko hannaeko commented Dec 18, 2023

Purpose

Exclude mock.interceptor.ts from the build file.

Context

Since Angular 9, the trick used to exclude mock.interceptor.ts no longer works. This PR aims at correcting that.

Changes

Import mock.interceptor.ts in the environment file instead of in app.module.ts .

How to test this PR

Before the change, after running npm run build

  • The build size (as reported by the npm run build command) is 940.51 kB
  • Some test domains can be found in the resulting bundle
    % grep -ic progress.afnic.fr dist/en/main.*.js
    1
    

after,

  • The build size (as reported by the npm run build command) is 914.67 kB
  • No test domain can be found in the resulting bundle
    % grep -ic progress.afnic.fr dist/en/main.*.js
    0
    

@hannaeko hannaeko added the V-Patch Versioning: The change gives an update of patch in version. label Dec 18, 2023
@hannaeko hannaeko added this to the v2023.2 milestone Dec 18, 2023
@hannaeko hannaeko force-pushed the avoid-bundling-tests-fixture-prod branch from 5e57b7a to 2d257ed Compare December 18, 2023 18:11
@matsduf
Copy link
Contributor

matsduf commented Dec 20, 2023

Can this be postponed to v2024.1 instead of adding it this late in the cycle? What will happen if the change is not done?

@matsduf matsduf modified the milestones: v2023.2, v2024.1 Dec 20, 2023
Copy link
Contributor

@marc-vanderwal marc-vanderwal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me.

@matsduf matsduf merged commit 2081722 into zonemaster:develop Jun 17, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
V-Patch Versioning: The change gives an update of patch in version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants