Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(bazel): ng_package not working on windows #27200

Commits on Dec 3, 2018

  1. fix(bazel): ng_package not generating UMD bundles on windows

    * Fixes that `ng_package` does not work generate UMD bundles on Windows because the `esm5/` files are not written to the output directory. This is because `rootDirs` and `rootDir` are posix paths and cause invalid relative paths when mixed with Windows backslash paths.
    devversion committed Dec 3, 2018
    Configuration menu
    Copy the full SHA
    7448b79 View commit details
    Browse the repository at this point in the history
  2. fix(bazel): do not throw error when writing tsickle externs

    * Currently when building the ES5 and ES2015 output, `ngc_wrapped` will fail because it tries to write the `fs.openSync` the tsickle output file at the same time. This causes a runtime exception in Windows and can be fixed by just writing the externs for ES5 mode to the proper ES5 "output root".
    devversion committed Dec 3, 2018
    Configuration menu
    Copy the full SHA
    5881799 View commit details
    Browse the repository at this point in the history
  3. fix(bazel): ng_package cannot be run multiple times without clean

    Currently when building the `ng_package` multiple times, the old `ng_package` output will be copied over to the new `ng_package` content. Resulting in packages like `src/cdk/npm_package/npm_package/npm_package/AND_MORE`.
    
    This happens because currently all TypeScript definition files are resolved from within the `binDir`. This is just wrong because it could then take up the `d.ts` files from the previous `ng_package` output. All typescript definitions that belong to the target package, should be resolved through Bazel and copied based on that computation.
    
    Also fixes that `esm` files aren't written to the `ng_package` on Windows. This is because we try to flatten paths using the `path.delimiter` while the path is always using Posix delimiters (causing the paths to be incorrect)
    devversion committed Dec 3, 2018
    Configuration menu
    Copy the full SHA
    694ff04 View commit details
    Browse the repository at this point in the history

Commits on Dec 4, 2018

  1. fix(compiler-cli): flatModuleIndex files not generated on windows wit…

    …h multiple input files
    
    * Currently when building a `ng_module` with Bazel and having the flat module id option set, the flat module files are not being generated because `@angular/compiler-cli` does not properly determine the entry-point file.
    
    Note that this logic is not necessarily specific to Bazel and the same problem can happen without Bazel if multiple TypeScript input files are specified while the `flatModuleIndex` option has been enabled.
    devversion committed Dec 4, 2018
    Configuration menu
    Copy the full SHA
    7f4e594 View commit details
    Browse the repository at this point in the history