forked from emberjs/data
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.mjs
45 lines (39 loc) · 1.16 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
import { Addon } from '@embroider/addon-dev/rollup';
import babel from '@rollup/plugin-babel';
import { nodeResolve } from '@rollup/plugin-node-resolve';
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: [
'@embroider/macros',
'@ember-data/store/-private',
'@ember-data/graph/-private',
'@ember/service',
'ember-inflector',
'@ember/debug',
'@ember/string',
'@ember/object',
'@ember/object/mixin',
'@ember/application',
'@glimmer/env',
'@ember/runloop',
'@ember/polyfills',
],
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']),
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(),
],
};