File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,9 @@ Common Changes
4242#) Added method :meth: `oracledb.getNetworkServiceNames() ` to support fetching
4343 the list of network service names from the ``tnsnames.ora `` file.
4444
45+ #) Remove the 'Critical Dependency' warning from webpack builds.
46+ See `Issue #1678 <https://github.com/oracle/node-oracledb/issues/1678 >`__.
47+
4548Thin Mode Changes
4649+++++++++++++++++
4750
Original file line number Diff line number Diff line change @@ -74,8 +74,16 @@ let _initOracleClientArgs;
7474
7575// Load the Oracledb binary
7676function _initCLib ( options ) {
77+ // Ensure that webpack compile does not throw any issues or warnings
78+ // See https://github.com/oracle/node-oracledb/issues/1156
79+ // and https://github.com/oracle/node-oracledb/issues/1678
80+ const nodeVer = typeof process !== 'undefined' && process . versions ?. node ;
7781 /*global __non_webpack_require__*/ // quieten eslint
78- const requireBinary = ( typeof __non_webpack_require__ === 'function' ) ? __non_webpack_require__ : require ; // See Issue 1156
82+ const requireBinary = nodeVer
83+ ? ( typeof __webpack_require__ === 'function' )
84+ ? __non_webpack_require__
85+ : require
86+ : undefined ;
7987 const binaryLocations = [
8088 '../' + nodbUtil . RELEASE_DIR + '/' + nodbUtil . BINARY_FILE , // pre-built binary
8189 '../' + nodbUtil . RELEASE_DIR + '/' + nodbUtil . BUILD_FILE , // binary built from source
You can’t perform that action at this time.
0 commit comments