Skip to content

Commit

Permalink
fix: declare side effect on some modules
Browse files Browse the repository at this point in the history
  • Loading branch information
Loïc Mangeonjean committed Jan 31, 2023
1 parent 0885bc2 commit 7c4dd8c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rollup/rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ const VSCODE_DIR = path.resolve(__dirname, '../vscode')
const NODE_MODULES_DIR = path.resolve(__dirname, '../node_modules')
const MONACO_EDITOR_DIR = path.resolve(NODE_MODULES_DIR, './monaco-editor')
const OVERRIDE_PATH = path.resolve(__dirname, '../src/override')
const KEYBOARD_LAYOUT_DIR = path.resolve(VSCODE_DIR, 'vs/workbench/services/keybinding/browser/keyboardLayouts')

function getMemberExpressionPath (node: recast.types.namedTypes.MemberExpression | recast.types.namedTypes.Identifier): string | null {
if (node.type === 'MemberExpression') {
Expand Down Expand Up @@ -107,7 +108,7 @@ export default (args: Record<string, string>): rollup.RollupOptions[] => {
annotations: true,
preset: 'smallest',
moduleSideEffects (id) {
return id.startsWith(SRC_DIR) || id.endsWith('.css')
return id.startsWith(SRC_DIR) || id.endsWith('.css') || id.startsWith(KEYBOARD_LAYOUT_DIR)
}
},
external,
Expand Down

0 comments on commit 7c4dd8c

Please sign in to comment.