Skip to content

Instantly share code, notes, and snippets.

@vincentdchan
Last active August 20, 2018 11:42
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 vincentdchan/e3b8f3a860a28e42d11e0f69ecb72b0d to your computer and use it in GitHub Desktop.
Save vincentdchan/e3b8f3a860a28e42d11e0f69ecb72b0d to your computer and use it in GitHub Desktop.
re-export from another module
// common.js
export * from './some' // export some
export function thing() {}
// index.js
import { some, thing } from './common.js'
/**
the hook would send [ 'some', 'thing' ] to my plugin for common.js,
my plugin only analyazes 'thing' from 'common.js',
so now it will skip 'thing' for 'common.js' because my plugin cannot find it. (It throw an error before, not it will skip)
If webpack sends 'some' to some.js, there will be nothing wrong.
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment