generated from obsidianmd/obsidian-sample-plugin
-
Notifications
You must be signed in to change notification settings - Fork 234
/
rollup.config.dev.mjs
34 lines (33 loc) · 924 Bytes
/
rollup.config.dev.mjs
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
import typescript from '@rollup/plugin-typescript';
import {nodeResolve} from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import copy from 'rollup-plugin-copy'
export default {
input: 'src/main.ts',
output: {
dir: 'examples/.obsidian/plugins/obsidian-tracker',
sourcemap: 'inline',
format: 'cjs',
exports: 'default'
},
external: ['obsidian'],
plugins: [
typescript(),
nodeResolve({browser: true}),
commonjs(),
copy({
targets: [
{ src: ['styles.css', 'manifest.json'], dest: 'examples/.obsidian/plugins/obsidian-tracker' }
]
})
],
onwarn: function(warning, warner){
if (warning.code === 'CIRCULAR_DEPENDENCY') {
if (warning.importer && warning.importer.startsWith('node_modules')) {
console.warn(`(!) Circular dependency: ${warning.importer}`);
}
} else {
warner(warning);
}
}
};