Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Commit

Permalink
fix @glimmer/core exports for bundlers & node ESM
Browse files Browse the repository at this point in the history
Previously @glimmer/core build outputs on commonjs
and modules folders were not universally runnable
interchangeably on bundlers are node.js runtimes.
This commit fixes by introducing default export
in addition to named exports.
  • Loading branch information
izelnakri committed Jun 25, 2021
1 parent e6bc5aa commit db4fe7c
Showing 1 changed file with 44 additions and 13 deletions.
57 changes: 44 additions & 13 deletions packages/@glimmer/core/index.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
export {
default as renderComponent,
RenderComponentOptions,
didRender,
getTemplateIterator,
ComponentDefinition,
} from './src/render-component';
import renderComponent, { didRender, getTemplateIterator } from './src/render-component';

export { BaseEnvDelegate } from './src/environment/delegates';
import { BaseEnvDelegate } from './src/environment/delegates';

export type { ComponentDefinition } from './src/render-component';
export type {
ModifierManager,
ModifierCapabilities,
Expand All @@ -16,10 +11,10 @@ export type {
HelperManager,
} from '@glimmer/interfaces';

export { templateFactory as createTemplateFactory } from '@glimmer/opcode-compiler';
export { templateOnlyComponent } from '@glimmer/runtime';
import { templateFactory as createTemplateFactory } from '@glimmer/opcode-compiler';
import { templateOnlyComponent } from '@glimmer/runtime';

export {
import {
setComponentManager,
setModifierManager,
setHelperManager,
Expand All @@ -29,6 +24,42 @@ export {
setComponentTemplate,
} from '@glimmer/manager';

export { getOwner, setOwner } from '@glimmer/owner';
import { getOwner, setOwner } from '@glimmer/owner';
import { precompileTemplate } from './src/template';

export { precompileTemplate } from './src/template';
export {
renderComponent,
didRender,
getTemplateIterator,
BaseEnvDelegate,
createTemplateFactory,
templateOnlyComponent,
setComponentManager,
setModifierManager,
setHelperManager,
componentCapabilities,
modifierCapabilities,
helperCapabilities,
setComponentTemplate,
getOwner,
setOwner,
precompileTemplate,
};
export default {
renderComponent,
didRender,
getTemplateIterator,
BaseEnvDelegate,
createTemplateFactory,
templateOnlyComponent,
setComponentManager,
setModifierManager,
setHelperManager,
componentCapabilities,
modifierCapabilities,
helperCapabilities,
setComponentTemplate,
getOwner,
setOwner,
precompileTemplate,
};

0 comments on commit db4fe7c

Please sign in to comment.