-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config_es.js
35 lines (34 loc) · 914 Bytes
/
rollup.config_es.js
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
28
29
30
31
32
33
34
35
import typescript from '@rollup/plugin-typescript';
import generatePackageJson from 'rollup-plugin-generate-package-json'
import {namespaceName} from "./rollup.globals";
import copy from 'rollup-plugin-copy'
// rollup.config.js
export default {
input: 'src/index.ts',
output: {
dir: 'dist/es',
name: namespaceName,
format: 'es'
},
plugins: [
typescript({
target: "ES5",
declaration: true,
outDir: "dist/es",
rootDir: "src"
}),
generatePackageJson({
outputFolder: "dist",
baseContents: (pkg) => {
pkg.main = "es/index.js";
pkg.scripts = undefined;
return pkg;
}
}),
copy({
targets: [
{ src: 'src/codejar-linenumbers.css', dest: 'dist/es' }
]
})
]
};