rust-analyzer/editors/code/rollup.config.js
2020-05-20 22:31:39 +03:00

27 lines
788 B
JavaScript

// @ts-check
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import nodeBuiltins from 'builtin-modules';
/** @type { import('rollup').RollupOptions } */
export default {
input: 'out/src/main.js',
plugins: [
resolve({
preferBuiltins: true
}),
commonjs({
namedExports: {
// squelch missing import warnings
'vscode-languageclient': ['CreateFile', 'RenameFile', 'ErrorCodes', 'WorkDoneProgress', 'WorkDoneProgressBegin', 'WorkDoneProgressReport', 'WorkDoneProgressEnd']
}
})
],
external: [...nodeBuiltins, 'vscode'],
output: {
file: './out/src/main.js',
format: 'cjs',
exports: 'named'
}
};