forked from bjornharrtell/jsts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrollup.config.js
More file actions
33 lines (31 loc) · 754 Bytes
/
rollup.config.js
File metadata and controls
33 lines (31 loc) · 754 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
28
29
30
31
32
33
import fs from 'fs'
import git from 'git-rev-sync'
import replace from 'rollup-plugin-replace'
import babel from '@rollup/plugin-babel'
const packageJson = JSON.parse(fs.readFileSync('./package.json'))
const license = fs.readFileSync('./license.txt', { encoding: 'utf8' })
export default {
input: 'src/jsts.js',
output: {
file: 'dist/jsts.js',
format: 'umd',
name: 'jsts',
banner: license,
sourcemap: true
},
plugins: [
replace({
npm_package_version: packageJson.version,
git_hash: git.short()
}),
babel({
exclude: 'node_modules/**',
presets: [['@babel/env', {
targets: {
browsers: ['>1%', 'not dead', 'not ie 11']
}
}]],
babelrc: false
})
]
}