closure-loader
closure-loader copied to clipboard
Webpack loader for Google Closure modules ✨
This is a workaround for the issue #16 "Incorrectly finds `goog.require` and `goog.provide` statements in comments"
The simple regex approach incorrectly finds `goog.require` and `goog.provides` statements that are within JavaScript comments, which can break compilation in certain situations.
The latest versions of google closure support es6 modules, as well as [closure-specific module syntax](https://github.com/google/closure-compiler/wiki/JS-Modules#importing-googmodule-code-into-an-es6-module) in the form of `import foo from 'goog:foo.bar.baz'`. This allows for files (for example, the...
When a file is `imported` with strict mode enabled, the resolution fails. ```js eval('var x=__merge(x||window.x||{},{"soy":{"examples":{"thing":{}},"thing":{}}});var soy=__merge(soy||window.soy||{},{});var soydata=__merge(soydata||window.soydata||{},{});'); ``` It looks like this line is executing correctly, however, when I try...