Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting to change the entry point of the packages of a site [8pt] #703

Open
SantosGuillamot opened this issue Feb 9, 2021 · 0 comments
Open
Labels
Projects

Comments

@SantosGuillamot
Copy link
Member

This is needed for AMP feature. For full context please check out the final Implementation proposal.


Some packages may require a different entry point for AMP because sometimes they are going to contain code that is not needed in the React version and we need to provide tools to make the bundle size of the React version as slim as possible.

This means that instead of using src/index.js, packages can use src/amp.js or src/amp/index.js as entry points when the site is an AMP site. This is of course optional, and the packages that don't need it or don't implement this can still use src/index.js.

It will be managed by a new site setting on the frontity.settings.js file:

export default {
  name: "my-amp-site",
  entryPoints: "amp",
  state: {
    //...
  },
  packages: [
    //...
  ],
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
AMP feature
  
To do
Development

No branches or pull requests

1 participant