Skip to content

Commit 0928949

Browse files
authored
Merge pull request #47 from CodinGame/fix-esm-external
Fix esm external config
2 parents 02f48b0 + 684c8b5 commit 0928949

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

rollup.config.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,15 @@ export default rollup.defineConfig({
5050
browser: true
5151
}),
5252
commonjs({
53-
esmExternals: (id) => id.match(/^vscode-languageserver-protocol(\/.*)?/) != null // required for monaco-emacs with use import monaco-editor esm code from commonjs code
53+
esmExternals: (id) => {
54+
if (id === 'vscode/services' || id === 'vscode') {
55+
return true
56+
}
57+
if (id.match(/^vscode-languageserver-protocol(\/.*)?/) != null) {
58+
return true
59+
}
60+
return false
61+
}
5462
}),
5563
babel({
5664
extensions,

0 commit comments

Comments
 (0)