Use Google-Closure-Library in webpack.
To run this app with NPM cli:
npm install
npm run build
Then use browser open the html files in directory build
.
- ./build/goog-require-example.html
Sample with traditionalgoog.require
(without return) andgoog.provide
. If usegoog.provide
defines a top namespace'Foo'
, this will create a global variable just like the'goog'
after require. So, never usegoog.provide
defines too many top namespace. - ./build/goog-module-example.html
Import the Closure module defined bygoog.module
. - ./build/goog-declare-example.html
Show how make cross reference between ES6 and Closure module.