Răsfoiți Sursa

Merge branch 'release/1.3.0'

lfabl 1 săptămână în urmă
părinte
comite
1a1511e81b
2 a modificat fișierele cu 12 adăugiri și 3 ștergeri
  1. 1 1
      package.json
  2. 11 2
      webpack-config.js

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
     "name": "ncore-ui-kit",
-    "version": "1.2.0",
+    "version": "1.3.0",
     "description": "NİBGAT® | NCore - UI Kit for React-Native Mobile Apps.",
     "main": "./lib/module/index.js",
     "types": "./lib/typescript/src/index.d.ts",

+ 11 - 2
webpack-config.js

@@ -1,4 +1,5 @@
 /* eslint-disable @typescript-eslint/no-require-imports */
+const fs = require("fs");
 const path = require("path");
 
 function withNCoreUIKitWebpack(config, webpack) {
@@ -56,7 +57,7 @@ function withNCoreUIKitWebpack(config, webpack) {
     if(webpack) {
         config.plugins.push(
             new webpack.ProvidePlugin({
-                process: "process/browser",
+                process: "process/browser.js",
                 Buffer: [
                     "buffer",
                     "Buffer"
@@ -107,6 +108,14 @@ function createDefaultWebpackConfig({
         }
     };
 
+    const fullySpecifiedIncludes = [
+        /node_modules\/ncore-ui-kit/
+    ];
+
+    if(fs.existsSync(path.resolve(appDirectory, "node_modules", "@react-navigation"))) {
+        fullySpecifiedIncludes.push(/node_modules\/@react-navigation/);
+    }
+
     let config = {
         plugins: [
             new webpack.DefinePlugin({
@@ -122,7 +131,7 @@ function createDefaultWebpackConfig({
                 babelLoaderConfiguration,
                 imageLoaderConfiguration,
                 {
-                    include: /node_modules\/@react-navigation/,
+                    include: fullySpecifiedIncludes,
                     resolve: {
                         fullySpecified: false
                     },