-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrollup.config.js
More file actions
27 lines (25 loc) · 864 Bytes
/
rollup.config.js
File metadata and controls
27 lines (25 loc) · 864 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
const { nodeResolve } = require('@rollup/plugin-node-resolve');
const commonjs = require('@rollup/plugin-commonjs');
const typescript = require('@rollup/plugin-typescript');
const replace = require('@rollup/plugin-replace');
const { join } = require('path');
const production = !process.env.ROLLUP_WATCH
module.exports = [{
input: 'src/extension.ts',
output: {
file: 'extension/index.js',
format: 'cjs',
external: [
'vscode'
]
},
plugins: [
replace({
'process.env.NODE_ENV': JSON.stringify(production ? 'production' : 'dev'),
'process.env.SERVER_PATH': JSON.stringify(join(__dirname, 'server', 'src', 'WebForms.LanguageServer', 'bin', 'Debug', 'net8.0', 'WebForms.LanguageServer.exe'))
}),
typescript(),
nodeResolve(),
commonjs()
]
}]