-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-components.js
More file actions
38 lines (36 loc) · 963 Bytes
/
build-components.js
File metadata and controls
38 lines (36 loc) · 963 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
34
35
36
37
38
const {executeRollup} = require('@vui/rollup-standalone')
// const builtins = require('rollup-plugin-node-builtins')
const globals = require('rollup-plugin-node-globals')
const path = require('path')
const localPopperPath = path.resolve(__dirname, '../sources/plugins/popper.js')
const localDebugPath = path.resolve(__dirname, '../sources/utils/debug.js')
executeRollup({
entry: 'packages/index.js',
dest: 'dist/vui.packages.js',
format: 'iife',
vueOptions: true,
moduleName: 'vui',
commonjsOptions: {
include: ['node_modules/**',
localPopperPath,
localDebugPath
],
namedExports: {},
ignore: ['util', 'tty'],
ignoreGlobal: false
},
resolveOptions: {},
extraPlugins: [
globals()
// builtins()
],
external: ['vue'],
globals: {
debug: 'debug',
vue: 'Vue'
}
})
process.on('unhandledRejection', (reason, p) => {
console.log('Unhandled Rejection at:', p)
console.log('reason:', reason)
})