Skip to content

Commit

Permalink
add missing cli flag support for experimental ssr
Browse files Browse the repository at this point in the history
  • Loading branch information
FredKSchott committed Oct 6, 2020
1 parent d03cb5c commit 2b3670f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions snowpack/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,13 @@ const configSchema = {
ssr: {type: 'boolean'},
},
},
experiments: {
type: ['object'],
properties: {
ssr: {type: 'boolean'},
app: {},
},
},
proxy: {
type: 'object',
},
Expand All @@ -161,6 +168,7 @@ function expandCliFlags(flags: CLIFlags): DeepPartial<SnowpackConfig> {
installOptions: {} as any,
devOptions: {} as any,
buildOptions: {} as any,
experiments: {} as any,
};
const {help, version, reload, config, ...relevantFlags} = flags;

Expand All @@ -174,6 +182,10 @@ function expandCliFlags(flags: CLIFlags): DeepPartial<SnowpackConfig> {
result[flag] = val;
continue;
}
if (configSchema.properties.experiments.properties[flag]) {
result.experiments[flag] = val;
continue;
}
if (configSchema.properties.installOptions.properties[flag]) {
result.installOptions[flag] = val;
continue;
Expand Down

0 comments on commit 2b3670f

Please sign in to comment.