forked from emberjs/data
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.mjs
40 lines (33 loc) · 1.1 KB
/
rollup.config.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
35
36
37
38
39
40
import { Addon } from '@embroider/addon-dev/rollup';
import babel from '@rollup/plugin-babel';
import { nodeResolve } from '@rollup/plugin-node-resolve';
import { external } from '@warp-drive/internal-config/rollup/external.js';
const addon = new Addon({
srcDir: 'src',
destDir: 'addon',
});
export default {
// This provides defaults that work well alongside `publicEntrypoints` below.
// You can augment this if you need to.
output: addon.output(),
external: external([
'@ember/debug',
'@embroider/macros',
'@glimmer/validator',
'@ember/-internals/metal',
'@glimmer/tracking/primitives/cache',
'@ember/object/compat',
]),
plugins: [
// These are the modules that users should be able to import from your
// addon. Anything not listed here may get optimized away.
addon.publicEntrypoints(['index.js', '-private.js']),
nodeResolve({ extensions: ['.ts'] }),
babel({
extensions: ['.ts'],
babelHelpers: 'runtime', // we should consider "external",
}),
// Remove leftover build artifacts when starting a new build.
addon.clean(),
],
};