0.15.0 • Published 7 months ago

@altack/nx-bundlefy v0.15.0

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

nx-bundlefy

Nx executor to ensure that all the buildable dependencies of a publishable library are part of the final bundle.

Installation

npm install -D @altack/nx-bundlefy

Also make sure to install the required peer dependencies:

npm install -D @nrwl/js @nrwl/devkit @nrwl/workspace validate-npm-package-name

Configuration

To use the executor, make sure to adjust your publishable library's project.json:

{
  "$schema": "../../node_modules/nx/schemas/project-schema.json",
  "sourceRoot": "libs/publishable-library/src",
  "targets": {
    "bundlefy": {
      "executor": "@altack/nx-bundlefy:run",
      "configurations": {},
      "dependsOn": ["build"],
      "outputs": ["{options.outputFile}"]
    },
    "build": {
      ...
    }
  }
}

Also make sure that buildable & publishable libraries are created using the --import-path modifier.

nx g lib my-library --buildable --import-path @org/my-library

Run the executor

This will ensure that all the buildable libraries are bundled as part of the library build

nx run publishable-library:bundlefy

Further reading

For a more detailed explanation, see this Stack Overflow question and the open issue in the Nx's repository

0.15.0

7 months ago

0.16.0

10 months ago

0.0.2

1 year ago

0.0.1

1 year ago