forked from emberjs/data
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.mjs
50 lines (43 loc) · 1.4 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
41
42
43
44
45
46
47
48
49
50
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([
'@embroider/macros',
'@ember/service',
'@ember/debug',
'@ember/object/computed',
'@ember-data/store/-private',
'@ember/object/internals',
'@ember-data/tracking/-private',
'@ember/object/promise-proxy-mixin',
'@ember/object/proxy',
'@ember/array',
'@ember/array/proxy',
'@ember/object',
'@ember/object/mixin',
'@ember/application',
'@ember/polyfills',
'expect-type',
]),
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', 'hooks.js', 'migration-support.js']),
nodeResolve({ extensions: ['.ts', '.js'] }),
babel({
extensions: ['.ts', '.js'],
babelHelpers: 'runtime', // we should consider "external",
}),
// Remove leftover build artifacts when starting a new build.
addon.clean(),
],
};