Skip to content
This repository was archived by the owner on Nov 22, 2024. It is now read-only.

refactor(webpack-prerender): decouple config from plugin - #464

Closed
filipesilva wants to merge 1 commit into
angular:masterfrom
filipesilva:webpack-plugin-update
Closed

filipesilva wants to merge 1 commit into
angular:masterfrom
filipesilva:webpack-plugin-update

Conversation

@filipesilva

@filipesilva filipesilva commented Jul 3, 2016 •

Copy link
Copy Markdown
Contributor
  • Please check if the PR fulfills these requirements
  • The commit message follows our guidelines: https://github.com/angular/universal/blob/master/CONTRIBUTING.md#commit-message-format
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • What modules are related to this pull-request
  • express-engine
  • grunt-prerender
  • gulp-prerender
  • hapi-engine
  • preboot
  • universal-preview
  • universal
  • webpack-prerender
  • What kind of change does this PR introduce?
    This PR decouples the prerender config from the webpack plugin.
  • What is the current behavior?
    Currently both behaviours are coupled, which can cause problems when including the plugin in tool-like projects that manipulate other projects. The two projects can have different @angular/x and angular2-universal dependencies, which would cause type errors on providers due to different type references.

Additionally, node require cache for app files is also deleted so that serialize can render an up to date version of the app.

  • What is the new behavior (if this is a feature change)?
    The config file exports the functions that the plugin needs to alter the prerendered template, but the dependencies are decoupled.
  • Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
    Yes, instructions are included in the README.md file.
  • Other information:

Comment thread modules/webpack-prerender/README.md Outdated

This webpack plugin is meant to be used together with a prerender entry file
exporting two functions:
- `getBoostrap`, which returns a Bootloader

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Typo

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Nice catch, thanks!

@PatrickJS

Copy link
Copy Markdown
Contributor

I have a new design for this now that allows for prerendering all of the routes to generate a static site using angular 2. closing for now

@PatrickJS PatrickJS closed this Aug 8, 2016
@angular-automatic-lock-bot

Copy link
Copy Markdown

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.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants