Comments (2)
Hey, thanks for the feedback.
I'm not a big expert on everything closure compiler related as I created this loader specifically to get rid of the closure compiler back in the day when I first created it (the project does not longer exist), so I can't fully answer your question.
That beeing said, this loader merely replaces goog.provide
and goog.require
with their node counterparts (module.export
and require()
) with some added namespacing. Thus file be be seen as a module by webpack and thus has its own scope. goog.scope
isn't necessary for the actual scoping, as every file is a normal webpack module (like any other regular module in webpack) but the loader doesn't do any of the inlining of aliases etc. that the compiler seems to do within such a scope (this would fall to whatever minification you do with our code).
This loader is generally compatible with the closure library, though every now an then some modules seem to have problems. There were some pull requests (and some are still opened where I sadly haven't come around to check them yet) to fix some of the issues though and you need to add special configuration for that.
As of support for the compiler itself (is there a webpack loader or plugin for that?): I have no idea. I think it should be compatible, but I have never tried myself (and to be honest: I don't intend on doing that).
from closure-loader.
Thanks for the response! I'll close this issue, but def helpful. thanks again
from closure-loader.
Related Issues (20)
- Support for ES6 'goog:foo.bar.baz' imports HOT 4
- goog.provide() broken if goog.require() used on a parent module
- Incorrectly finds `goog.require` and `goog.provide` statements in comments HOT 5
- Resolving only JS files - Not respecting configuration HOT 5
- Webpack peer dependecy version HOT 4
- Webpack 2 example HOT 2
- Module build failed: Error: Can't find closure dependency goog.xxx HOT 3
- Update Examples HOT 15
- shimming for closure library - goog.global HOT 2
- global namespaces being polluted by deep-extend
- How to disable strict mode with loader? HOT 1
- Make eval optional
- This package is no longer maintained HOT 5
- Webpack 4 Support HOT 3
- Causes "Uncaught TypeError: Cannot set property '???' of undefined" in some cases. HOT 3
- deep-extend 0.5.1 vulnerability HOT 2
- Cannot read property 'config' of null HOT 2
- ERROR in ./content/closure-polyfill.js Module build failed: Error: Can't find closure dependency goog.debug HOT 1
- ERROR in ./content/closure-polyfill.js Module build failed: Error: Can't find closure dependency bot HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from closure-loader.