mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
refactor(localize): ensure schematic code runs as commonjs (#44016)
The schematic code in `@angular/localize` is currently still emitted as CommonJS, while the rest of `@angular/localize` is strict ESM (which is also denoted through `type: module` in the package.json file). The schematic code is currently imported as CJS from the CLI so it is not a problem right now. Still, it is safer to ensure the code for schematics is properly picked up as CJS through a local `package.json` file resetting `type: module` to `type: commonjs`. PR Close #44016
This commit is contained in:
parent
d93ac1e81b
commit
70f93a640b
2 changed files with 5 additions and 3 deletions
|
|
@ -6,15 +6,14 @@ filegroup(
|
|||
name = "package_assets",
|
||||
srcs = [
|
||||
"collection.json",
|
||||
"package.json",
|
||||
],
|
||||
visibility = ["//packages/localize:__subpackages__"],
|
||||
)
|
||||
|
||||
pkg_npm(
|
||||
name = "npm_package",
|
||||
srcs = [
|
||||
"collection.json",
|
||||
],
|
||||
srcs = [":package_assets"],
|
||||
deps = [
|
||||
"//packages/localize/schematics/ng-add",
|
||||
],
|
||||
|
|
|
|||
3
packages/localize/schematics/package.json
Normal file
3
packages/localize/schematics/package.json
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"type": "commonjs"
|
||||
}
|
||||
Loading…
Reference in a new issue