-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrollup.config.js
More file actions
47 lines (45 loc) · 1.06 KB
/
rollup.config.js
File metadata and controls
47 lines (45 loc) · 1.06 KB
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
39
40
41
42
43
44
45
46
47
import vue from 'rollup-plugin-vue'
import postcss from 'rollup-plugin-postcss'
import { nodeResolve } from '@rollup/plugin-node-resolve'
import commonjs from '@rollup/plugin-commonjs'
import path from 'path'
import { fileURLToPath } from 'url'
const __dirname = path.dirname(fileURLToPath(import.meta.url))
export default {
input: 'src/index.js',
output: [
{
file: 'dist/nextcloud-vue.esm.js',
format: 'es',
sourcemap: true,
inlineDynamicImports: true,
},
{
file: 'dist/nextcloud-vue.cjs.js',
format: 'cjs',
sourcemap: true,
inlineDynamicImports: true,
},
],
external: [
'vue',
/^@nextcloud\//,
'pinia',
/^vue-material-design-icons\//,
],
plugins: [
{
name: 'resolve-apexcharts',
resolveId(source) {
if (source === 'apexcharts/dist/apexcharts.min') {
return path.resolve(__dirname, 'node_modules/apexcharts/dist/apexcharts.min.js')
}
return null
},
},
vue({ css: false }),
postcss({ extract: 'nextcloud-vue.css' }),
nodeResolve({ extensions: ['.mjs', '.js', '.json', '.node'] }),
commonjs(),
],
}