-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Migrate workspace to Nx 16.1.1 * deps code has moved into the `@nx/js` plugin * Fix plugin compat for Nx 16.1.1 * e2e tests seem more stable with nx 16.1.1 so added some back * Fix lint error * Revert "e2e tests seem more stable with nx 16.1.1 so added some back" This reverts commit 00e987b. * Tests failing in CI env, see if its that stupid workspace root thing * Revert "Tests failing in CI env, see if its that stupid workspace root thing" This reverts commit b405a47. * ah ok, you gotta tell createTreeWithEmptyWorkspace you need an apps-libs layout for tests * run CI in node 16 & 18, and use v3 actions * remove debug console * tidy up CI action * update changelog
- Loading branch information
Showing
59 changed files
with
9,800 additions
and
8,238 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
# Using Nx Libraries within nested sub-directories | ||
|
||
If you create Nx Libraries in subdirectories, you should use `--importPath` when generating the buildable library, because `@nrwl/node:lib` by default generates library path aliases that are incompatible with `npm` package naming and also Firebase functions deployment. See [Github discussion here](https://github.com/nrwl/nx/issues/2794). | ||
If you create Nx Libraries in subdirectories, you should use `--importPath` when generating the buildable library, because `@nx/node:lib` by default generates library path aliases that are incompatible with `npm` package naming and also Firebase functions deployment. See [Github discussion here](https://github.com/nrwl/nx/issues/2794). | ||
|
||
For instance: | ||
|
||
**`nx g @nrwl/node:lib nodelib --directory subdir --buildable`** | ||
**`nx g @nx/node:lib nodelib --directory subdir --buildable`** | ||
|
||
will generate Typescript path alias and `package.json` name of `@myorg/subdir/nodelib` (note the extra backslash separator) which isn't compatible with how Firebase functions are deployed. | ||
|
||
Instead, when generating sub-directory Nx libraries that will be used by Firebase functions, use the `--importPath` feature to ensure the library has a compatible package name. eg. | ||
|
||
**`nx g @nrwl/node:lib nodelib --directory subdir --buildable --importPath='@myorg/subdir-nodelib'`** | ||
**`nx g @nx/node:lib nodelib --directory subdir --buildable --importPath='@myorg/subdir-nodelib'`** | ||
|
||
> _**Note:** The Nx-Firebase plugin will detect if any such libraries are imported by a firebase application, and halt compilation._ | ||
## Publishable vs Buildable Nx Node Libraries | ||
|
||
As of Nx 12.3.4, there doesn't seem to be much difference between a `--publishable` and a `--buildable` node library. The docs _suggest_ the builder for publishable libraries [generates optimized/webpack code](https://nx.dev/latest/angular/structure/buildable-and-publishable-libraries) but this doesn't seem to be the case in practice. | ||
|
||
Both options have `@nrwl/js:tsc` as the builder target, and both generate a `package.json` file for the library, but using `--publishable` when generating a library will require that `--importPath` is specified. | ||
Both options have `@nx/js:tsc` as the builder target, and both generate a `package.json` file for the library, but using `--publishable` when generating a library will require that `--importPath` is specified. | ||
|
||
Both of these library options are compatible with Nx-Firebase applications. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.