-
-
Notifications
You must be signed in to change notification settings - Fork 428
Folder structure for Sapper apps #432
Comments
I agree that the folder structure should be changed. I was also thinking of putting everything inside a import config from 'sapper/config/rollup.js';
export default {
client: {
input: config.client.input(),
output: config.client.output(),
// ...
},
server: {
input: config.server.input(),
output: config.server.output(),
// ...
},
serviceworker: {
input: config.serviceworker.input(),
output: config.serviceworker.output(),
// ...
}
}; ...it doesn't follow the traditional structure of a config file, though maybe that's okay? Thoughts welcome. I was thinking of renaming So my suggestion would be
|
A single configuration file is better than three separate files and less confusing, specially for developers coming from other similar frameworks. |
I'm very much in favour of having a EDIT: at least I don't feel having three config files is confusing, because they mirror the structure of the entry points. |
Auto-generated files in |
And do not forget there should be a way to set a custom build directory, for instance if we build for Firebase hosting it has to be inside a special sapper build firebase/functions/app |
Sapper will soon become very popular. We should change the folder structure as early as possible. I am in favor of single configuration file as I would like to have less cluttered and cleaner folder structure. |
Released 0.21 with this change — see sapper-template or the migration guide |
I am proposing a better folder structure for Sapper apps which I think is more logical.
MyApp
build
src
-- routes folder
-- server.js
-- client.js
-- service-worker.js
-- template.html
-- rollup-config.js or webpack-config.js (Single file exporting config objects for server/client/service-worker)
assets
-- manifest.json
-- favicon.png
-- global.css
The text was updated successfully, but these errors were encountered: