Skip to content

add support for external template/styles in webpack branch #1371

Closed

Description

@jeffbcross

I tried removing the isMobile special case from app.component.ts and use the standard templateUrl and styleUrls to see if the new webpack magic would automatically fix the issues with loading external templates, but it still fails. I walked through with @gdi2290 and he proposes that we make the webpack app shell plugin (addon/ng2/utilities/prerender-webpack-plugin.ts) run against webpack-already-processed files/bundles, which will have already inlined the template and styles via the angular2-template-loader.

Patrick says he can have it done in 5 minutes from now.

Activity

  1. PatrickJS commented on Jul 19, 2016

    @PatrickJS
    Contributor

    I got it working in 5 minutes but ran into a problem with importing in different contexts (known problem when working in Node with Angular 2 because Angular's di relies on references. The other problem is Reflect which has the same problem). I just need to isolate the prerendering in a separate process

  2. filipesilva commented on Jul 19, 2016

    @filipesilva
    Contributor

    I like that idea, it will make mobile much less special-case-y.

    I should mention that at the moment we're using a built-in version of angular/universal#464 instead of importing prerender-webpack-plugin.ts, but that we should import it once the PR is in.

  3. PatrickJS commented on Jul 19, 2016

    @PatrickJS
    Contributor

    it shouldn't be too hard to also prerender other pages with folders using the router config. I got it working if routes was exported

  4. added
    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
    P1Impacts a large percentage of users; if a workaround exists it is partial or overly painful
    and removed
    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
    on Jul 28, 2016
  5. filipesilva commented on Jul 28, 2016

    @filipesilva
    Contributor

    @gdi2290 did you manage to get it working? If you point me in the right direction I can maybe pick it up.

  6. added
    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
    and removed
    P1Impacts a large percentage of users; if a workaround exists it is partial or overly painful
    on Aug 26, 2016
  7. hansl commented on Jan 11, 2017

    @hansl
    Contributor

    Closing this as fixed already.

  8. angular-automatic-lock-bot commented on Sep 6, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  9. locked and limited conversation to collaborators on Sep 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgenteffort1: easy (hours)featureLabel used to distinguish feature request from other issues

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions