joshburgess / redux-most

Most.js based middleware for Redux. Handle async actions with monadic streams & reactive programming.
https://www.npmjs.com/package/redux-most
MIT License
139 stars 14 forks source link

Simplify umd build #21

Closed vlad-zhukov closed 7 years ago

vlad-zhukov commented 7 years ago

Squashed webpack configs into a single file.

joshburgess commented 7 years ago

Interesting. I haven't used EnvironmentPlugin before... only DefinePlugin. Does this still produce both minified and unminified umd builds? How does it know what environment it's currently in when building? Is that related to the exported array?

module.exports = [devConfig, prodConfig]

vlad-zhukov commented 7 years ago

EnvironmentPlugin works the same as DefinePlugin in this situation.

Webpack supports array of configs and it runs them synchronously one after another, but it's not a well-documented feature (like many others 😄 ). It's unrelated to EnvironmentPlugin.

Output bundles stay the same as before.

vlad-zhukov commented 7 years ago

UMD build of most exports to window.most, see https://unpkg.com/most@1.4.0/dist/most.js

joshburgess commented 7 years ago

Sorry for not merging this yet. I like that you reduced all of the scripts boilerplate down into one line for the UMD builds, but I'm just a little hesitant about the all configs in one file + the exported array approach... How often is the exported array feature used by others? Do we know it's going to continue being available?

vlad-zhukov commented 7 years ago

The ability to export arrays of configs is there for years (for example see https://github.com/webpack/webpack/issues/1122#issuecomment-107246046), the feature is just not documented well.

Since it's the only way to produce multiple bundles with one command I don't see why it's going to be removed.

joshburgess commented 7 years ago

Okay, I was just checking. I was reading through some old webpack 2 issues recently and saw they had removed some other feature. So, I wasn't sure how stable/safe that one was. I'll probably merge this tonight or some time this weekend.

joshburgess commented 7 years ago

This is now merged and in master. Thanks, @Vlad-Zhukov . 👍