Skip to content

Instantly share code, notes, and snippets.

@cawa-93
Created November 30, 2020 10:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cawa-93/2d62803d98be6d2153b020f6d5879e5d to your computer and use it in GitHub Desktop.
Save cawa-93/2d62803d98be6d2153b020f6d5879e5d to your computer and use it in GitHub Desktop.
reexport-test
export { B as ButtonComponent } from './main.js';
function IconComponent() {
console.log('This is IconComponent');
}
function HeavyComponent() {
console.log('This is HeavyComponent');
}
export { HeavyComponent, IconComponent };
function ButtonComponent() {
console.log('This is ButtonComponent');
}
ButtonComponent();
import('./index-407b6fe0.js').then(({IconComponent}) => IconComponent());
export { ButtonComponent as B };
export function ButtonComponent() {
console.log('This is ButtonComponent');
}
export function HeavyComponent() {
console.log('This is HeavyComponent');
}
export function IconComponent() {
console.log('This is IconComponent');
}
export * from './ButtonComponent.js'
export * from './IconComponent.js'
export * from './HeavyComponent.js'
import {ButtonComponent} from './components/index.js';
ButtonComponent()
import('./components/index.js').then(({IconComponent}) => IconComponent())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment