From e04a6d320d73f8f983026b1d91945cd22415388c Mon Sep 17 00:00:00 2001 From: ahmetkuslular Date: Mon, 8 Aug 2022 15:30:40 +0300 Subject: [PATCH] Error Fix-1 --- package.json | 7 +++---- src/universal/core/route/routeConstants.js | 6 +----- webpack.common.config.js | 2 ++ 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index c72e6b5..ce38dcb 100644 --- a/package.json +++ b/package.json @@ -62,10 +62,12 @@ "helmet": "3.21.3", "hiddie": "^1.0.0", "history": "^5.3.0", + "https-browserify": "^1.0.0", "husky": "^3.1.0", "identity-obj-proxy": "3.0.0", "intersection-observer": "0.7.0", "js-cookie": "^2.2.1", + "lodash": "^4.17.21", "mini-css-extract-plugin": "2.5.2", "newrelic": "^6.13.0", "node-sass": "6.0.1", @@ -88,6 +90,7 @@ "sass-loader": "12.4.0", "serve-static": "1.14.1", "source-map-support": "0.5.21", + "stream-http": "^3.2.0", "string-replace-loader": "3.1.0", "style-loader": "3.3.1", "styled-components": "5.1.0", @@ -129,9 +132,5 @@ "commitLimit": false, "template": "changelog-template.hbs", "package": true - }, - "peerDependencies": { - "react": ">=16.13.0", - "react-dom": ">=16.13.0" } } diff --git a/src/universal/core/route/routeConstants.js b/src/universal/core/route/routeConstants.js index fd52cf3..91a72f9 100644 --- a/src/universal/core/route/routeConstants.js +++ b/src/universal/core/route/routeConstants.js @@ -1,8 +1,4 @@ -import { generateComponents } from '../../utils/helper'; - -const componentConfig = require('__V_COMPONENTS__'); - -const components = generateComponents(componentConfig.default); +import components from './components'; const ROUTE_PATHS = {}; const ROUTE_CONFIGS = {}; diff --git a/webpack.common.config.js b/webpack.common.config.js index 3ca8e8a..cfb65b5 100644 --- a/webpack.common.config.js +++ b/webpack.common.config.js @@ -101,6 +101,8 @@ const commonConfig = merge(voltranCommonConfig, { }, fallback: { url: false, + http: require.resolve('stream-http'), + https: require.resolve('https-browserify'), }, }, });