Skip to content

npm run build:prod doesn't produce AOT bundles for lazy loaded modules #422

@KhalipskiSiarhei

Description

@KhalipskiSiarhei

If I run npm run build:prod it produces the following JS:
aot1

So, there is not a lazy loaded JS module! But when I run the project via F5 it adds 0.js because of DebugRunWebpack target which runs JIT compilation in advance:
aot2

If I fix the mentioned above command to <Exec Command="node node_modules/webpack/bin/webpack.js --end.prod" /> lazy loaded modules stop working during build process as well.

Could you clarify why npm run build:prod doesn't produce AOT bundles for lazy loaded modules, but it is created durnig solution building? Is lazy loaded module AOT bundle in 100%?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions