Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/fix-edit-config-minimatch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@powersync/cli-plugin-config-edit': patch
'powersync': patch
---

fix `powersync edit config` crashing with `Cannot find module 'minimatch'` by keeping `@oclif/core` external in the editor server build
10 changes: 9 additions & 1 deletion packages/editor/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,21 @@ const config = defineConfig({
},
plugins: [
devtools(),
nitro({ rollupConfig: { external: [/^@sentry\//], treeshake: true } }),
nitro({ rollupConfig: { external: [/^@sentry\//, /^@oclif\/core(\/|$)/], treeshake: true } }),
tailwindcss(),
tanstackStart({}),
viteReact()
],
resolve: {
tsconfigPaths: true
},
// `@oclif/core` is CommonJS and lazily `require()`s its own dependencies (for example
// `minimatch` from its plugin loader). Inlining it into the server bundle moves those
// `require()` calls out of its own `node_modules` context, so at runtime they resolve
// relative to `editor-dist/` and fail under strict (non-hoisted) installs.
// Keep it external so it is loaded from the published plugin's own `node_modules`.
ssr: {
external: ['@oclif/core']
}
});

Expand Down
Loading