Open romanoff opened 8 years ago
I believe Closure Compiler can consume ES6 sources, though I haven't tried it yet myself.
If you aren't building with ES6, there is a build target to compile Incremental DOM to a goog.module
(gulp js-closure). You can use this from other goog.modules
as follows:
goog.module('my.module');
var IncrementalDom = goog.require('incrementaldom');
or from a traditional goog.provide
'd file:
goog.provide('my.namespace');
goog.scope(function() {
var IncrementalDom = goog.module.get('incrementaldom');
});
There is a problem with some parens needed for type-casts being dropped by Babel, but it works otherwise.
Seems like the library itself can be compiled using Closure Compiler with a little effort. I'm experimenting with this in https://github.com/google/incremental-dom/pull/227.
Hello. I wanted to write application with incremental dom and then compile it using Closure Compiler in advanced mode. Ideally I would not load incremental dom as extern, but as a package (this way theoretically I would get greater minification and if certain features were not used by me, they would be stripped down). Is it possible? Has anybody tried it? Example would be greatly appreicated