Skip to content

Instantly share code, notes, and snippets.

View iamakulov's full-sized avatar

Ivan Akulov iamakulov

View GitHub Profile
@iamakulov
iamakulov / test.js
Last active June 23, 2017 17:13 — forked from tricoder42/bundle.js
Removing development files from bundle (using NormalModuleReplacementPlugin)
// This import should be dropped in production,
// because it's very large and contains development data
// (like locales for all languages).
import load from './very.large'
export const main = () => {
let data = {}
if (process.env.NODE_ENV !== 'development') {
data = load()