angular/aio/content/examples/upgrade-module/src/systemjs.config.1.js
Alan Agius 6e26af52fa feat(bazel): (APF) Angular Package Format updates (#49559)
Several updates to Angular Package Format.

BREAKING CHANGE:

Several changes to the Angular Package Format (APF)
- Removal of FESM2015
- Replacing ES2020 with ES2022
- Replacing FESM2020 with FESM2022

PR Close #49559
2023-03-23 08:18:45 -07:00

60 lines
2.1 KiB
JavaScript

/**
* System configuration for Angular samples
* Adjust as necessary for your application needs.
*/
(function (global) {
System.config({
paths: {
// paths serve as alias
'npm:': 'node_modules/'
},
// map tells the System loader where to look for things
map: {
// our app is within the app folder
app: 'app',
// angular bundles
'@angular/core': 'npm:@angular/core/fesm2022/core.mjs',
'@angular/common': 'npm:@angular/common/fesm2022/common.mjs',
'@angular/common/http': 'npm:@angular/common/fesm2022/http.mjs',
'@angular/compiler': 'npm:@angular/compiler/fesm2022/compiler.mjs',
'@angular/platform-browser': 'npm:@angular/platform-browser/fesm2022/platform-browser.mjs',
'@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/fesm2022/platform-browser-dynamic.mjs',
'@angular/router': 'npm:@angular/router/fesm2022/router.mjs',
'@angular/forms': 'npm:@angular/forms/fesm2022/forms.mjs',
// #docregion upgrade-static-package
'@angular/upgrade/static': 'npm:@angular/upgrade/fesm2022/static.mjs',
// #enddocregion upgrade-static-package
// other libraries
'rxjs': 'npm:rxjs/dist/cjs',
'rxjs/operators': 'npm:rxjs/dist/cjs/operators',
'tslib': 'npm:tslib/tslib.js',
'angular-in-memory-web-api': 'npm:angular-in-memory-web-api/bundles/in-memory-web-api.umd.js',
'plugin-babel': 'npm:systemjs-plugin-babel/plugin-babel.js',
'systemjs-babel-build': 'npm:systemjs-plugin-babel/systemjs-babel-browser.js'
},
transpiler: 'plugin-babel',
// packages tells the System loader how to load when no filename and/or no extension
packages: {
'app': { main: './main.js', defaultExtension: 'js' },
'rxjs': {
defaultExtension: 'js',
format: 'cjs',
main: 'index.js'
},
'rxjs/operators': {
defaultExtension: 'js',
format: 'cjs',
main: 'index.js'
},
'meta': {
'*.mjs': {
babelOptions: {
es2015: false
}
}
}
}
});
})(this);