generated from adobe/aem-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 1
/
rollup.config.mjs
35 lines (29 loc) · 985 Bytes
/
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
import resolve from '@rollup/plugin-node-resolve';
import commonjs from "@rollup/plugin-commonjs";
import replace from '@rollup/plugin-replace';
// https://www.npmjs.com/package/@adobe/exc-app is currently only available as a CommonJS module.
// I created a ticket to have it published as an ES module as well: https://jira.corp.adobe.com/browse/EXC-34144
// Until then, we need to use a workaround to convert CommonJS to ES modules.
export default [
{
input: ['build/rollup-entrypoints/exc-app.js'],
output: {
dir: 'scripts/libs/exc-app/',
format: 'esm'
},
treeshake: false,
plugins: [commonjs(), resolve()]
},
{
input: ['build/rollup-entrypoints/platform-connector.js'],
output: {
dir: 'scripts/libs/platform-connector/',
format: 'esm'
},
treeshake: false,
plugins: [commonjs(), resolve(), replace({
preventAssignment: true,
'process.env.NODE_ENV': JSON.stringify( 'production' )
})]
}
];