question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Reserve `config` export

See original GitHub issue

Describe the problem

We’ve alluded to a vague plan to support route-level deployment config in the future — something like this…

export const config = {
  runtime: 'edge'
};

…where config is a freeform (but serializable) object that gets passed to adapters so that they can use it to customise the deployment.

At the moment, you can export anything from a +(layout|page)(.server)?.js file. This means that adding a new known export would be a breaking change, as someone might already be doing export const config = {...} for some other reason.

Describe the proposed solution

Reserve the config name, i.e. throw an error if a route file exports a binding called config.

Alternatives considered

Prevent any unknown exports. This is safer, but might feel unduly restrictive.

Importance

would make my life easier

Additional Information

No response

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Reactions:4
  • Comments:18 (12 by maintainers)

github_iconTop GitHub Comments

6reactions
AlecAivaziscommented, Dec 2, 2022

Just to reiterate - I dont think this conversation is super relevant to the original issue. Nor do I expect this to be resolved before 1.0 can get released. I understand the want to group as many breaking changes as possible before 1.0 and i would feel very bad if this conversation was blocking the release. To me, it seems like the _ prefix provides all of the future-proofing required and leaves the rest of the conversation for another time.

3reactions
gterrascommented, Nov 30, 2022

Some advanced (and very useful) plugins like https://github.com/HoudiniGraphql/houdini also take advantage of exporting stuff there. Overall if feels unnecessarily restricting and will close the door to many potential ingenious plugins later on (which is sad considering plugins may become very important for svelte-kit at some point).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using Netsh to export and import DHCP reservations
dhcp server \\servername; Now issue the export command. The following command exports the full service configuration to the c:\Temp\Dhcpdb file:
Read more >
Export File Delivery Configuration
With delivery configuration, you select the delivery methods and enter the delivery destinations for export files. Each export has its own delivery ...
Read more >
Export-DhcpServer - Microsoft Learn
The Export-DhcpServer cmdlet exports the Dynamic Host Configuration Protocol (DHCP) server service configuration, and optionally lease data, ...
Read more >
Panorama > Scheduled Config Export - Palo Alto Networks
Enter a name to identify the configuration export job (up to 31 characters). The name is case-sensitive and must be unique. Use only...
Read more >
Export and import base station settings in AirPort Utility on Mac
After you configure a base station, open the AirPort Utility app on your Mac, then choose File > Export Configuration File. In the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found