open-index/open-npm huggingface dataset:
npm package: @lukethacoder/lwrjs-lwc-module-provider
Description: ⚡ An opinionated edit to the @lwrjs/lwc-module-provider package to add support for namespaces and multi directory modules (via @lukethacoder/lwc-module-resolver)
Latest version: 0.12.2

# @lukethacoder/lwrjs-lwc-module-provider

⚡ An opinionated edit to the [`@lwrjs/lwc-module-provider`](https://www.npmjs.com/package/@lwrjs/lwc-module-provider) package to add support for namespaces and multi directory modules (via [`@lukethacoder/lwc-module-resolver`](https://github.com/lukethacoder/lwc-module-resolver))

## Install

```
pnpm add @lukethacoder/lwrjs-lwc-module-provider
```

Edit your `lwr.config.json` file to include the module.

```json
{
  "lwc": {
    "modules": [],
  },
  "moduleProviders": [
    "@lwrjs/label-module-provider",
    "@lwrjs/app-service/moduleProvider",
    "@lukethacoder/lwc-module-provider",
    "@lwrjs/npm-module-provider"
  ],
  "routes": []
}
```

## Custom Namespace Directories

> The heavy lifting of the enhancements come from the [`@lukethacoder/lwc-module-resolver`](https://github.com/lukethacoder/lwc-module-resolver/tree/main) package. Below is a snippet of the docs from that package.

Instead of assuming the namespace based on the folder structure, you can declaratively set namespaces to directories. Automatic namespacing is still enabled. 

The primary driver for this is the on platform folder structure conflicting with the standard open source folder structure.

Multiple directory per namespace is also supported. This is great for package developers who wish to break up their code into smaller packages but still have the benefits of a local dev server.

```json
{
  "modules": [
    {
      "dir": "src/modules"
    },
    { 
      "dir": "force-app/main/default/lwc",
      "namespace": "c" 
    }
  ]
}
```

This example shows how you can assign the `c` namespace to the default salesforce LWC folder, whilst still keeping the standard config for folder based namespacing.

## Multi Directory Namespacing

Multiple directory per namespace has also been added. This is great for package developers who wish to break up their code into smaller packages but still want to have the benefits of a local dev server.

```json
{
  "modules": [
    {
      "dir": "src/modules"
    },
    { 
      "dir": "force-app/main/default/lwc",
      "namespace": "c" 
    },
    {
      "dirs": [
        "force-app/ui-account-flow/default/lwc",
        "force-app/ui-shared/default/lwc"
      ],
      "namespace": "ui"
    }
  ]
}
```

This example shows how you can assign the `ui` namespace to multiple source folders, whilst still keeping the standard config for folder based namespacing.

> NOTE:
> This package aims to open up current imitations enforced by open source LWC and on-platform Salesforce development. This is done purely to make your life as a developer easier and is not intended to be used as a part of a production build. These enhancements may allow you to do things that will **NOT** work on-platform.
npm package: @lukethacoder/lwrjs-module-registry
Description: ⚡ An opinionated edit to the @lwrjs/module-registry package to add Windows Support and bug fixes.
Latest version: 0.16.2

# lwrjs-module-registry

⚡ An opinionated edit to the [`@lwrjs/module-registry`](https://www.npmjs.com/package/@lwrjs/module-registry) package with windows support and bug fixes.

## Fixes

### Windows Support

Several issues have been raised around Windows specific issues when running both LWR and [`lightning-base-components`](https://www.npmjs.com/package/lightning-base-components).

- [Issue with using LWC base components <lightning-input> with the LWR Single Page Application - salesforce/lwc/issues/2993](https://github.com/salesforce/lwc/issues/2993)
- [Nested Module Imports are not resolved in LWC (but work on-platform) - salesforce/lwc/issues/3495](https://github.com/salesforce/lwc/issues/3495)
- [Build not working on Windows - trailheadapps/lwc-recipes-oss/issues/498](https://github.com/trailheadapps/lwc-recipes-oss/issues/498)

These issues are no longer issues 😊

### `index.(js|ts)` relative import

Minor bug where attempting to import a relative module from an `index.(js|ts)` file would result in an incorrect specifier. This should fix [Nested Module Imports are not resolved in LWC (but work on-platform) - salesforce/lwc/issues/3495](https://github.com/salesforce/lwc/issues/3495).