Comments (3)
提供下具体的代理设置和问题复现步骤
from ice-scripts.
1.ice.config.js 配置详情如下
const path = require('path');
module.exports = {
hash: true,
entry: 'src/index.jsx',
publicPath: './',
outputDir: 'dist',
plugins: [
['ice-plugin-fusion', {
themePackage: '@icedesign/theme',
}],
['ice-plugin-moment-locales', {
locales: ['zh-cn'],
}],
['ice-plugin-load-assets', {
assets: {
dev: ['https://unpkg.com/[email protected]/umd/react.development.js', 'https://cdnjs.cloudflare.com/ajax/libs/axios/0.19.2/axios.min.js', 'https://unpkg.com/[email protected]/umd/react-dom.development.js'],
build: ['https://unpkg.com/[email protected]/umd/react.production.min.js', 'https://cdnjs.cloudflare.com/ajax/libs/axios/0.19.2/axios.min.js', 'https://unpkg.com/[email protected]/umd/react-dom.production.min.js'],
},
}],
],
alias: {
'@': path.resolve(__dirname, './src/'),
},
chainWebpack: (config) => {
config.devServer.hot(true);
},
define: {
ENV: JSON.stringify(process.env.ENV),
},
proxy: {
"/**": {
"enable": true,
"target": "http://127.0.0.1:4444" 或者 http://192.168.3.17:4444
}
}
};
-
axios 配置如下
const service = axios.create({
baseURL: ‘https://exam.com’,
headers: {
'content-type': 'application/json;charset=UTF-8;',
},
});
3.然后访问 http://192.168.3.17:4444或者 http://127.0.0.1:4444,均出现
Error occurred while trying to proxy request /d08f25d3db064a8b5efb.hot-update.json from 127.0.0.1
:4444 to http://127.0.0.1:4444 (EADDRINUSE) (https://nodejs.org/api/errors.html#errors_common_system_er
rors)
Error occurred while trying to proxy request /api/mobile/management/login from 192.168.3.17:4444
to http://192.168.3.17:4444/ (ENOBUFS) (https://nodejs.org/api/errors.html#errors_common_system_errors)
from ice-scripts.
默认 devserver 访问就是 http://127.0.0.1:4444
,不需要再代理了, 可以尝试下代理到其他地址是否正常
from ice-scripts.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ice-scripts.