Skip to content

Conversation

@aduth
Copy link
Member

@aduth aduth commented Mar 24, 2017

Related: #307 (comment)

This pull request...

  • Targets entry files explicitly
  • Include hpq in Babel loader consideration (since it defines module of package)

To the latter point, curious if we can avoid explicitly including files to be processed by Babel but instead allow them to be automatically detected. Maybe for a future pull request, as at least the changes here avoid any errors when running npm run build.

@youknowriad
Copy link
Contributor

Include hpq in Babel loader consideration (since it defines module of package)

I think I've read somewhere that the module entry should point to already "transpiled" code (minus the modules), to allow tree shaking. Isn't this a better approach, that way the consumers of the package hpq don't need to bother about building it.

@youknowriad
Copy link
Contributor

I'm merging this as is, because I'm experiencing issues with npm run build right now. We can revisit later to avoid transpiling deps maybe

@youknowriad youknowriad merged commit 156161d into master Mar 24, 2017
@youknowriad youknowriad deleted the fix/webpack-entry branch March 24, 2017 09:09
@aduth
Copy link
Member Author

aduth commented Mar 24, 2017

I think I've read somewhere that the module entry should point to already "transpiled" code (minus the modules)

Huh, I didn't know this, but I think you might be right. I guess I figured if it relies on ES2015 modules, that the rest of ES2015 is fair game. But looking through some other projects which define module like Redux, it's clear they're transpiled:

https://unpkg.com/[email protected]/es/createStore.js

@aduth
Copy link
Member Author

aduth commented Mar 24, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants