Skip to content

Commit

Permalink
feat: json plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
kshutkin committed Jul 4, 2024
1 parent 787620e commit 0921a94
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changeset/light-plums-decide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"pkgbld": minor
"pkgbld-internal": minor
---

added json plugin
8 changes: 8 additions & 0 deletions pkgbld/src/builtin-plugins/json.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { Priority } from '../priorities';
import { Provider } from '../types';

export default async function(provider: Provider) {
const pluginJson = await provider.import('@rollup/plugin-json');

provider.provide(() => pluginJson(), Priority.preprocess);
}
4 changes: 3 additions & 1 deletion pkgbld/src/get-plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import resolve from './builtin-plugins/resolve';
import terser from './builtin-plugins/terser';
import typescript from './builtin-plugins/typescript';
import binify from './builtin-plugins/binify';
import json from './builtin-plugins/json';

export const plugins = [
clean,
Expand All @@ -16,7 +17,8 @@ export const plugins = [
resolve,
terser,
typescript,
binify
binify,
json
];

const noop = () => undefined;
Expand Down
7 changes: 6 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0921a94

Please sign in to comment.