ember-fastboot / ember-cli-fastboot

Server-side rendering for Ember.js apps
http://ember-fastboot.com/
MIT License
852 stars 160 forks source link

Increment latest schema version to 5 #822

Open xg-wang opened 3 years ago

xg-wang commented 3 years ago

html-oriented manifest format

In the new schema format, which is defined in https://github.com/ember-fastboot/fastboot/pull/272/commits/3fd5bc90b63e2c497a8f519627556f9e94160065 the manifest is written into HTML and later extracted by fastboot on server side instead of previously reading from dist/package.json

Note:

(1) fastboot config The new schema in fastboot did not handle fastboot config https://github.com/ember-fastboot/ember-cli-fastboot/tree/e4d0b7c7bcdf82def0dc8726835b49d707673f41#providing-additional-config The support is added in the https://github.com/ember-fastboot/ember-cli-fastboot/pull/854

The fastboot config meta has the name ending with "config/fastboot-environement" to distinguish from regular "config/environement" meta tags. If the new meta tags are not found, which happens in embroider builds, we fallback to find regular meta tags.

(2) keeping package.manifest We cannot drop manifest field in the generated package.json until broccoli-asset-rev support support reading config from html.

Allow to require module path from whitelisted dependency

Incrementing schema to 5 also included the changes in schema 4 strictWhitelist See https://github.com/ember-fastboot/fastboot/pull/200

xg-wang commented 3 years ago

We should also ignore certain scripts like https://github.com/embroider-build/embroider/pull/455/files

xg-wang commented 3 years ago

@ef4 @rwjblue this is ready for review, can you take a look?