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
42
42
#) Added method :meth: `oracledb.getNetworkServiceNames() ` to support fetching
43
43
the list of network service names from the ``tnsnames.ora `` file.
44
44
45
+ #) Remove the 'Critical Dependency' warning from webpack builds.
46
+ See `Issue #1678 <https://github.com/oracle/node-oracledb/issues/1678 >`__.
47
+
45
48
Thin Mode Changes
46
49
+++++++++++++++++
47
50
Original file line number Diff line number Diff line change @@ -74,8 +74,16 @@ let _initOracleClientArgs;
74
74
75
75
// Load the Oracledb binary
76
76
function _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 ;
77
81
/*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 ;
79
87
const binaryLocations = [
80
88
'../' + nodbUtil . RELEASE_DIR + '/' + nodbUtil . BINARY_FILE , // pre-built binary
81
89
'../' + nodbUtil . RELEASE_DIR + '/' + nodbUtil . BUILD_FILE , // binary built from source
You can’t perform that action at this time.
0 commit comments