From 48e5f9f84b7c15b1e70951ed1d4fa72ba755dba0 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Wed, 21 Aug 2019 14:48:38 +0800 Subject: [PATCH] import './public-path.js'; --- public/react/src/App.js | 1 + public/react/src/public-path.js | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 public/react/src/public-path.js diff --git a/public/react/src/App.js b/public/react/src/App.js index 9621fdc18..3fd121268 100644 --- a/public/react/src/App.js +++ b/public/react/src/App.js @@ -1,4 +1,5 @@ import React, {Component} from 'react'; +import './public-path.js'; import logo from './logo.svg'; import './App.css'; import {LocaleProvider} from 'antd' diff --git a/public/react/src/public-path.js b/public/react/src/public-path.js new file mode 100644 index 000000000..fb82840d4 --- /dev/null +++ b/public/react/src/public-path.js @@ -0,0 +1,6 @@ +/*global __webpack_public_path__ */ +if (window.location.host == '47.96.87.25:48080') { + __webpack_public_path__ = 'http://testali-cdn.educoder.net/react/build/' +} else if (window.location.host == 'www.educoder.net') { + __webpack_public_path__ = 'https://ali-newweb.educoder.net/react/build/' +} \ No newline at end of file