Skip to content

AOT Build on Hybrid Application does not include html into the main.bundle #6742

@schmitch

Description

@schmitch

Bug Report or Feature Request (mark with an x)

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

Versions.

@angular/cli: 1.1.1
node: 8.1.1
os: darwin x64

Repro steps.

  • create a Angular and AngularJS application bootstrap the AngularJS 1 application with:
    this.upgrade.bootstrap(document.body, [ng1module.name], {strictDi: true});
  • add components with templateUrl: ./login.html
  • ng build --prod will now not include the login.html to the main.bundle.js, (--aot false, works)

The log given by the failure.

404

Desired functionality.

it should also include AngularJS 1.X html templates into the main.bundle.js (I mean it works without aot..)

Mention any other details that might be useful.

Well it might be helpful but our application layout is kinda special, we imported all of our AngularJS application into the Folder:
src/old/
and our components might be in any folder there, i.e. everything like that is valid:

src/old/login/login.js
src/old/login/login.html
src/old/crm/list/customer-list.js
src/old/crm/list/customer-list.html
src/old/crm/customer/detail/customer-detail.js
src/old/crm/customer/detail/customer-detail.html

sadly without --aot our main.bundle and vendor.bundle are way to big (3mb-4mb together).

Edit: Strange thing is that with --aot enabled it will actually have templateUrl, while without in development/production it will produce: template: e("WZfy"), and the function correctly for every template.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P5The team acknowledges the request but does not plan to address it, it remains open for discussioneffort2: medium (days)featureLabel used to distinguish feature request from other issueshelp wantedLabel noting an issue which the team is looking for contribution from the community to fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions