angular/integration/hello_world__closure/rollup.config.mjs
Paul Gschwendtner 46933d8c87 test: update hello_world_closure integration test to use APF v13 (#43431)
Updates the `hello_world_closure` integration test to use APF v13
in combination with the linker plugin which is needed as running
the `ngc` command standalone does not modify the `node_modules`
and the FW packages remain partially compiled. A step in between
using rollup can create a linker-processed bundle of all FW
packages.

PR Close #43431
2021-10-01 18:28:46 +00:00

27 lines
No EOL
775 B
JavaScript

import {nodeResolve} from '@rollup/plugin-node-resolve';
import {babel} from '@rollup/plugin-babel';
import {ConsoleLogger, NodeJSFileSystem, LogLevel} from '@angular/compiler-cli';
import {createEs2015LinkerPlugin} from '@angular/compiler-cli/linker/babel';
/** File system used by the Angular linker plugin. */
const fileSystem = new NodeJSFileSystem();
/** Logger used by the Angular linker plugin. */
const logger = new ConsoleLogger(LogLevel.info);
/** Linker babel plugin. */
const linkerPlugin = createEs2015LinkerPlugin({
fileSystem,
logger,
linkerJitMode: false,
});
export default {
input: './built/src/main.js',
output: {
file: './built/bundle.js',
format: 'iife'
},
plugins: [
nodeResolve(),
babel({plugins: [linkerPlugin]}),
]
}