Skip to content

Commit 404415f

Browse files
patch SSR context for output and workspace dirs
1 parent cbea964 commit 404415f

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

patches/@greenwood+cli+0.30.0-alpha.5.patch

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,23 @@ index a1d16e5..1a8c659 100644
418418
}
419419
];
420420
}
421+
diff --git a/node_modules/@greenwood/cli/src/loader.js b/node_modules/@greenwood/cli/src/loader.js
422+
index 792f43c..ca3c8b7 100644
423+
--- a/node_modules/@greenwood/cli/src/loader.js
424+
+++ b/node_modules/@greenwood/cli/src/loader.js
425+
@@ -7,9 +7,10 @@ const resourcePlugins = config.plugins
426+
.filter(plugin => plugin.name !== 'plugin-node-modules:resource' && plugin.name !== 'plugin-user-workspace')
427+
.map(plugin => plugin.provider({
428+
context: {
429+
- outputDir: new URL(`file://${process.cwd()}/public`),
430+
+ outputDir: new URL(`file://${process.cwd()}/public/`),
431+
projectDirectory: new URL(`file://${process.cwd()}/`),
432+
- scratchDir: new URL(`file://${process.cwd()}/.greenwood/`)
433+
+ scratchDir: new URL(`file://${process.cwd()}/.greenwood/`),
434+
+ userWorkspace: new URL(`file://${process.cwd()}/src/`) // TODO hmm, we can't hardcode this...
435+
},
436+
config: {
437+
devServer: {}
421438
diff --git a/node_modules/@greenwood/cli/src/plugins/resource/plugin-content-as-data.js b/node_modules/@greenwood/cli/src/plugins/resource/plugin-content-as-data.js
422439
new file mode 100644
423440
index 0000000..5d299de

0 commit comments

Comments
 (0)