UNPKG

crootfast

Version:

大前端工程化命令行脚手架

55 lines (54 loc) 1.38 kB
const { getAppnamePath, getGlobal } = global['$crootweb']; // locationOrigin const proxyTableOrigin = { dev: "http://localhost:8081/", test: "http://172.20.0.131:18086/", stating: "http://172.20.0.131:18086/", prod: "http://172.20.0.131:18086/" }; const locationOrigin = { dev: "http://localhost:8080/", test: "http://172.20.0.131:18086/", stating: "http://172.20.0.131:18086/", prod: "http://172.20.0.131:18086/" }; module.exports = { base: { alias: { "@demo": getAppnamePath('./') }, rules: [], plugins: [], mfp: [{ name: 'demo', remotes: { 'fui': `fui@${locationOrigin[getGlobal('env')]}reactFastUserInterface.js`, }, shared: require('./package.json').dependencies // 声明当前应用程序打包时,应将 package.json 文件中列出的依赖项视为共享模块 }] }, dev: { server: "http", // 设置启动服务使用的协议,可以是http、https open: false, // 启动成功后是否自动打开浏览器 port: "auto", proxyTable: { "/api/**": { target: proxyTableOrigin[getGlobal('env')], secure: false, changeOrigin: true // pathRewrite: {} } }, rules: [], plugins: [] }, pro: { rules: [], plugins: [] }, // 配置frame、env conf: { "frame": "react", "env": "dev" } };