Skip to content

svelte.config.js #1101

@Rich-Harris

Description

@Rich-Harris

Just spotted this issue: DeMoorJasper/parcel-plugin-svelte#6

I'm not wild about the idea of introducing another config file into people's projects, but if folks are going to start doing it, then there should probably be a canonical, officially supported form.

(This, incidentally, is why the current 'zero-config' marketing fad is such nonsense: it really means 'abdicate the responsibility for config'. Instead of a single place where you can view all the build config in a structured, coherent form, you have the exact same amount of config but scattered around your project in lots of annoying files that are harder to understand.)

Other plugins like rollup-plugin-svelte and svelte-loader — and the CLI — could also load svelte.config.js. (We'd have to figure out the semantics — do the options in rollup.config.js or webpack.config.js override svelte.config.js, or extend them? Also, what happens if you have svelte.client.config.js and svelte.server.config.js? How do you reference them?)

Clearly this introduces some regrettable complexity. One advantage we'd get in return would be that documentation becomes clearer — rather than explaining 'oh, you need to add this to the option you pass to rollup-plugin-svelte, or maybe svelte-loader, or...' we can just say 'this is what you put in your config file'.

Is this the zero-config tail wagging the dog? Or would this be a worthwhile addition?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions