faststore icon indicating copy to clipboard operation
faststore copied to clipboard

Add more configuration options to faststore.config.js

Open jonmast opened this issue 1 year ago • 5 comments

We are setting up Sentry for error logging on JW Pepper and their plugin requires adding config to the Next and adding some custom files to the project root.

I'm open to ideas on improvements or different ways of going about this.

jonmast avatar Jan 22 '24 20:01 jonmast

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
faststore-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 22, 2024 8:57pm

vercel[bot] avatar Jan 22 '24 20:01 vercel[bot]

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit bd4b811d90b16e0c326fa74381e3d1dba17c578a:

Sandbox Source
Store UI Typescript Configuration

codesandbox-ci[bot] avatar Jan 22 '24 20:01 codesandbox-ci[bot]

@icazevedo @hellofanny Have you had a chance to look at this?

jonmast avatar Jan 29 '24 13:01 jonmast

hey @jonmast Sorry for the delayed response! 🙇‍♀️

Firstly, thank you for your contribution!

We have some concerns about the potential overriding of previously set configurations in the next.config, which could affect certain features, such as the outputFileTracingRoot option. 🤔

Maybe we could explore an approach that allows modifying a specific set of parameters or something more controlled solution(?). This could help mitigate the risk of unintended consequences. I'll also bring this up for further discussion with the team.

hellofanny avatar Mar 01 '24 01:03 hellofanny

@hellofanny Thanks for reviewing. Sentry needs access to the config to add a webpack plugin which is pretty involved in itself, so I'm not sure if restricting to just that key would really help?

It's pretty common for NextJS plugins to be exposed as a function which transforms the the config from what I've seen, and they attempt to update in a safe way which is compatible with any options being set. Obviously if you expose this config option there's no way to ensure it is only used by well behaved plugins though, so I understand your concern.

Ultimately I think if your users break things by overriding configs then that isn't your fault. Our alternative at this point is using custom versions of the FastStore packages which I'm sure is going to cause even more problems.

jonmast avatar Mar 01 '24 14:03 jonmast