https://github.com/dmnsgn/rollup-plugin-no-op
Replace imported module with 'export default {}' using module IDs. Useful when using 'external' is not enough.
https://github.com/dmnsgn/rollup-plugin-no-op
Last synced: 2 months ago
JSON representation
Replace imported module with 'export default {}' using module IDs. Useful when using 'external' is not enough.
- Host: GitHub
- URL: https://github.com/dmnsgn/rollup-plugin-no-op
- Owner: dmnsgn
- License: mit
- Created: 2023-06-28T09:42:26.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-06T12:42:00.000Z (10 months ago)
- Last Synced: 2025-02-04T22:06:36.543Z (3 months ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome - no-op - Replace imported modules with empty object (Plugins / Modules)
README
# rollup-plugin-no-op
[](https://www.npmjs.com/package/rollup-plugin-no-op)
[](https://www.npmjs.com/package/rollup-plugin-no-op)
[](https://bundlephobia.com/package/rollup-plugin-no-op)
[](https://github.com/dmnsgn/rollup-plugin-no-op/blob/main/package.json)
[](https://github.com/microsoft/TypeScript)
[](https://conventionalcommits.org)
[](https://github.com/prettier/prettier)
[](https://github.com/eslint/eslint)
[](https://github.com/dmnsgn/rollup-plugin-no-op/blob/main/LICENSE.md)Replace imported module with `export default {}` using module IDs. Useful when using [external](https://rollupjs.org/configuration-options/#external) is not enough.
[](https://paypal.me/dmnsgn)
[](https://commerce.coinbase.com/checkout/56cbdf28-e323-48d8-9c98-7019e72c97f3)
[](https://twitter.com/dmnsgn)## Installation
```bash
npm install rollup-plugin-no-op
```## Usage
Create a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin:
```js
import noOp from "rollup-plugin-no-op";export default {
input: "src/index.js",
output: {
dir: "output",
},
plugins: [
// ...,
noOp({ ids: ["inspector"] }), // Replace Node.js built-in "inspector"
],
};
```Then call `rollup` either via the [CLI](https://www.rollupjs.org/guide/en/#command-line-reference) or the [API](https://www.rollupjs.org/guide/en/#javascript-api).
## License
MIT. See [license file](https://github.com/dmnsgn/rollup-plugin-no-op/blob/main/LICENSE.md).