You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 16, 2025. It is now read-only.
ERROR in ./closure/goog/base.js:698 from closure-compiler: Closure primitive methods (goog.provide, goog.require, goog.define, etc) must be called at file scope.
goog.forwardDeclare('Document');
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR in ./closure/goog/base.js:699 from closure-compiler: Closure primitive methods (goog.provide, goog.require, goog.define, etc) must be called at file scope.
goog.forwardDeclare('HTMLScriptElement');
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR in ./closure/goog/base.js:700 from closure-compiler: Closure primitive methods (goog.provide, goog.require, goog.define, etc) must be called at file scope.
goog.forwardDeclare('XMLHttpRequest');
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR in ./core/blockly.js:10 (originally at line 5) from closure-compiler: Closure primitive methods (goog.provide, goog.require, goog.define, etc) must be called at file scope.
const module = goog.require('testModule');
^^^^^^^^^^^^^^^^^^^^^^^^^^
Note that the entry-point file is 'core/blockly.js' because that matches the project I'm trying to convert to using webpack. See the main repository here: https://github.com/google/blockly
Expected behavior
There should be no errors when compiling with the closure-webpack-plugin.
Additional Info
I think this may be related to using a local copy of base.js? But I'm not sure. We would really like to continue using a local copy if possible so that we can remove unnecessary parts of base.js in the future.
Package version: 2.5.0
Node version: 14.15.0
OS: Ubuntu
Minimal example: https://github.com/BeksOmega/closure-webpack-bug
Reproduction steps
npm installnpm run make-depsnpm run webpackNote that the entry-point file is 'core/blockly.js' because that matches the project I'm trying to convert to using webpack. See the main repository here: https://github.com/google/blockly
Expected behavior
There should be no errors when compiling with the closure-webpack-plugin.
Additional Info
I think this may be related to using a local copy of
base.js? But I'm not sure. We would really like to continue using a local copy if possible so that we can remove unnecessary parts ofbase.jsin the future.Thank you for your time!