rust-analyzer/editors/code/rollup.config.js
2019-12-30 12:29:33 +01:00

25 lines
658 B
JavaScript

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/main.ts',
plugins: [
typescript(),
resolve({
preferBuiltins: true
}),
commonjs({
namedExports: {
// squelch missing import warnings
'vscode-languageclient': ['CreateFile', 'RenameFile']
}
})
],
external: [...nodeBuiltins, 'vscode'],
output: {
file: './out/main.js',
format: 'cjs'
}
};