-
Notifications
You must be signed in to change notification settings - Fork 63
/
Copy pathrollup.config.js
36 lines (34 loc) · 1.02 KB
/
rollup.config.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
36
import buble from 'rollup-plugin-buble' // Transpile/polyfill with reasonable browser support
import vue from 'rollup-plugin-vue' // Handle .vue SFC files
import { terser } from 'rollup-plugin-terser'
import conditional from 'rollup-plugin-conditional'
import replace from '@rollup/plugin-replace'
import path from 'path'
import pkg from './package.json'
const isTerse = process.env.MINIFY === 'true'
export default {
input: 'src/index.js', // Path relative to package.json
output: {
name: 'HoneybadgerVue',
exports: 'named',
globals: { '@honeybadger-io/js': 'Honeybadger' },
sourcemap: true,
sourcemapPathTransform: relativePath => {
// will transform e.g. "src/main.js" -> "main.js"
return path.relative('src', relativePath)
},
},
external: [
'@honeybadger-io/js'
],
plugins: [
replace({
preventAssignment: false,
exclude: 'node_modules/**',
__VERSION__: pkg.version
}),
vue(),
buble(), // Transpile to ES5
conditional(isTerse, [terser()])
],
}