Skip to content

Document ngtools/webpack replaceExport for AoT Bundles on Platform Server #7488

@josephliccini

Description

@josephliccini

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search issues before submitting
- [x ] feature request

(documentation request)

Versions.

1.3.1, @ngtools/webpack 1.6.1

Repro steps.

new AoTPlugin({
   mainPath: '/path/to/main.server.ts',
   entryModule: '/path/to/entry-module.module#EntryModule',
   skipCodeGeneration: false,
   replaceExport: false
})

This will generate an incorrect bundle (just main and entry module)

To fix, use either skipCodeGeneration: true (to turn off AoT) or replaceExport: true to properly build.

Desired functionality.

I would like this option documented. I spent some time trying to figure out why my universal bundle in ngtools/webpack was not building correctly and I happened to find this setting. It would be great to have this documented so others don't spend as much time as I did.

I think when ng eject for platform server is out it will be easier for most folks, but until then, the docs are all we really have for universal outside the cli.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: @ngtools/webpackarea: docsRelated to the documentationhelp wantedLabel noting an issue which the team is looking for contribution from the community to fix

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions