Angular Package Format v6 stops bundling files in the esm5 and esm2015 directories, now that Webpack 4 can tree-shake per-file. Adds some missing files like package.json to make packages closer to what we publish today. Refactor ng_package to be a type of npm_package and re-use the packaging action from that rule. PR Close #22782
		
			
				
	
	
		
			39 lines
		
	
	
		
			888 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			39 lines
		
	
	
		
			888 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| package(default_visibility = ["//visibility:public"])
 | |
| 
 | |
| load("//tools:defaults.bzl", "ng_module", "ng_package")
 | |
| 
 | |
| ng_module(
 | |
|     name = "platform-browser",
 | |
|     srcs = glob(
 | |
|         [
 | |
|             "*.ts",
 | |
|             "src/**/*.ts",
 | |
|         ],
 | |
|     ),
 | |
|     module_name = "@angular/platform-browser",
 | |
|     deps = [
 | |
|         "//packages:types",
 | |
|         "//packages/common",
 | |
|         "//packages/core",
 | |
|     ],
 | |
| )
 | |
| 
 | |
| ng_package(
 | |
|     name = "npm_package",
 | |
|     srcs = [
 | |
|         "package.json",
 | |
|         "//packages/platform-browser/animations:package.json",
 | |
|         "//packages/platform-browser/testing:package.json",
 | |
|     ],
 | |
|     entry_point = "packages/platform-browser/index.js",
 | |
|     secondary_entry_points = [
 | |
|         "animations",
 | |
|         "testing",
 | |
|     ],
 | |
|     deps = [
 | |
|         ":platform-browser",
 | |
|         "//packages/platform-browser/animations",
 | |
|         "//packages/platform-browser/testing",
 | |
|     ],
 | |
| )
 |