mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
Updates the service-worker package to export the worker script and schema, so that these files can be resolved and included by consumers. Additionally, the CLI bundle is updated to be using ESM as it transitively relies on the `core` entry-point of the package which already uses ESM. Also this is required because the script is part of the the service-worker package which has `type: module` applied. PR Close #43431
21 lines
668 B
JavaScript
21 lines
668 B
JavaScript
/**
|
|
* @license
|
|
* Copyright Google LLC All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
* found in the LICENSE file at https://angular.io/license
|
|
*/
|
|
|
|
module.exports = {
|
|
resolveExtensions: ['.mjs'],
|
|
// Note: `@bazel/esbuild` has a bug and does not pass-through the format from Starlark.
|
|
format: 'esm',
|
|
banner: {
|
|
// Workaround for: https://github.com/evanw/esbuild/issues/946
|
|
// TODO: Remove this workaround in the future once devmode is ESM as well.
|
|
js: `
|
|
import {createRequire as __cjsCompatRequire} from 'module';
|
|
const require = __cjsCompatRequire(import.meta.url);
|
|
`,
|
|
},
|
|
};
|