From 2151d4da6a7ba908bc2dba541431493b75c48df8 Mon Sep 17 00:00:00 2001 From: JasperDeSutter Date: Mon, 23 Sep 2019 23:25:16 +0200 Subject: add rollup bundler for vscode extension --- editors/code/rollup.config.js | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 editors/code/rollup.config.js (limited to 'editors/code/rollup.config.js') diff --git a/editors/code/rollup.config.js b/editors/code/rollup.config.js new file mode 100644 index 000000000..a023b8c3f --- /dev/null +++ b/editors/code/rollup.config.js @@ -0,0 +1,27 @@ +import typescript from 'rollup-plugin-typescript'; +import resolve from 'rollup-plugin-node-resolve'; +import commonjs from 'rollup-plugin-commonjs'; +import nodeBuiltins from 'builtin-modules'; + +export default { + input: './src/extension.ts', + plugins: [ + typescript(), + resolve(), + commonjs({ + namedExports: { + // squelch missing import warnings + 'vscode-languageclient': [ 'CreateFile', 'RenameFile' ] + } + }), + ], + // keep these as require() calls, bundle the rest + external: [ + ...nodeBuiltins, + 'vscode', + ], + output: { + file: './bundle/extension.js', + format: 'cjs', + } +}; -- cgit v1.2.3