Reserve `config` export
See original GitHub issueDescribe 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:
- Created 10 months ago
- Reactions:4
- Comments:18 (12 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

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.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).