Fork me on GitHub
#cljs-dev
<
2017-07-26
>
thheller09:07:55

@dnolen the stuff you just added for the module loader could potentially be used to combine the load+resolve

thheller09:07:25

eg. instead of remembering which module a namespace is in directly load a def

thheller09:07:01

(load/special-invoke 'some.ns/fn foo bar args)

thheller09:07:56

or (load/resolve 'some.ns/fn (fn [the-thing-it-resolved-to] ...))

thheller09:07:52

just an idea not sure if useful yet

thheller09:07:28

but it sure would be nice if you don’t have to remember which module a namespace is in since that might change over time

dnolen12:07:18

@thheller that’s a pretty nice idea, will think about that

thheller20:07:03

oh such fun … react@next v16 beta is out, index.js looks like

thheller20:07:05

'use strict';

if (process.env.NODE_ENV === 'production') {
  module.exports = require('./cjs/react.production.min.js');
} else {
  module.exports = require('./cjs/react.development.js');
}

thheller21:07:01

well .. I guess it still works. only that :none also loads the minified version and closure has to kill the dev version …

thheller21:07:18

guess its time to write the process.env.NODE_ENV preprocessor

thheller21:07:31

has anyone seen that pattern before? seems like a weird thing to do, wonder if its common?

Roman Liutikov21:07:32

Not common afaik