Socket
Socket
Sign inDemoInstall

@altack/nx-bundlefy

Package Overview
Dependencies
365
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @altack/nx-bundlefy

Nx executor to ensure that all the buildable dependencies of the publishable library are bundled together with the library


Version published
Weekly downloads
845
increased by62.19%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

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

Keywords

FAQs

Last updated on 10 Oct 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc