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

Support for package priorities [8pt] #707

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

Support for package priorities [8pt] #707

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

Comments

@SantosGuillamot
Copy link
Member

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


In some cases, we will need to defined packages priorities to define in which order they are executed.

For example, the @frontity/amp package needs to be executed before any other package because it is going to change the entryPoints setting and that will affect how the rest of the packages are imported.

This will be managed by a priority export in the frontity.config.js file of this package.

// packages/amp/frontity.config.js
export const priority = 2;

Users can override this setting in the frontity.settings.js file:

export default {
  name: "my-amp-site",
  packages: [
    {
      name: "some-package",
      priority: 5, // Override default priority for this package.
      state: {
        // ...
      },
    },
  ],
};
@SantosGuillamot SantosGuillamot added this to To do in AMP feature via automation Feb 9, 2021
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