jaredLunde / webpack2-react-sass-env-boilerplate

A boilerplate for creating Javascript packages with Webpack 3*, babel-preset-env, React + HMR, and SASS.
MIT License
4 stars 2 forks source link

Why do you build both to es and dist? #3

Closed tarjei closed 7 years ago

tarjei commented 7 years ago

Hi, what is the thinking behind build:es and build:commonjs? I'm trying to wrap my head around the config and understand why it is done.

kind regards, Tarjei

jaredLunde commented 7 years ago

So you can import the es modules or commonjs modules from another package. For instance, I share some components between web apps and react-native apps.

tarjei commented 7 years ago

Aha! Thanks :)

2017-04-20 18:45 GMT+02:00 Jared Lunde notifications@github.com:

So you can import the es modules or commonjs modules from another package. For instance, I share some components between web apps and react-native apps.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jaredlunde/webpack2-react-sass-env-boilerplate/issues/3#issuecomment-295808696, or mute the thread https://github.com/notifications/unsubscribe-auth/AAM5P27EXDgak83W9p43N993LW_avaowks5rx4u1gaJpZM4NCzhT .

--


Tarjei Huse Mobil: 920 63 413