Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: correct rollup to bundle all but core #846

Merged
merged 1 commit into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/client/src/events/open-feature-event-emitter.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { GenericEventEmitter } from '@openfeature/core';
import EventEmitter from 'events';
import { EventEmitter } from 'events';
import { ProviderEmittableEvents } from './events';
/**
* The OpenFeatureEventEmitter can be used by provider developers to emit
Expand Down
2 changes: 1 addition & 1 deletion packages/server/src/events/open-feature-event-emitter.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { GenericEventEmitter } from '@openfeature/core';
import EventEmitter from 'events';
import { EventEmitter } from 'node:events';
toddbaert marked this conversation as resolved.
Show resolved Hide resolved
import { ProviderEvents } from './events';

/**
Expand Down
16 changes: 7 additions & 9 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,15 @@ export default {
input: "./src/index.ts",
output: {
file: './dist/types.d.ts',
format: 'es', // module format doesn't really matter here since output i
format: 'es', // module format doesn't really matter here since output is types
},
// function indicating which deps should be considered external: external deps will NOT have their types bundled
external: (id) => {
// bundle everything but '@openfeature/core', which is a peer
return id === '@openfeature/core';
},
external: [
toddbaert marked this conversation as resolved.
Show resolved Hide resolved
// function indicating which deps should be considered external: non-external deps will have their types bundled
(id) => {
// bundle 'events' types
return id !== 'events';
}
],
plugins: [
// use the rollup override tsconfig (applies equivalent in each sub-packages as well)
dts({tsconfig: './tsconfig.rollup.json'}),
dts({tsconfig: './tsconfig.rollup.json', respectExternal: true }),
beeme1mr marked this conversation as resolved.
Show resolved Hide resolved
],
};
Loading