码迷,mamicode.com
首页 > 其他好文 > 详细

dva+antd写的一个react例子--服务器nginx 的配置

时间:2017-09-18 22:29:31      阅读:505      评论:0      收藏:0      [点我收藏+]

标签:trigger   theme   extra   logs   put   top   als   col   nbsp   

location ^~ /crm {
        rewrite ^/crm/(.*)(\.js|\.css|\.png|\.jpg|\.jpeg|\.gif|index\.php|robots\.txt)$ /$1$2 break;
        rewrite .* /index.html break;
        root /etc/nginx/static2/CIF_crm-frontend/dist/crm/;
 }

 以上是nginx的配置

{
  "entry": "src/index.js",
  "disableCSSModules": false,
  "cssModulesExclude": ["./src/global.less"],
  "publicPath": "/crm/",
  "outputPath": "./dist/crm",
  "hash": true,
  "theme": {
    "@primary-color": "#5c94d6",
    "@link-color": "#6e97c4",
    "@border-radius-base": "5px",
    "@font-size-base": "12px",
    "@line-height-base": "1.2",
    "@btn-padding-base": "10px 15px",
    "@btn-border-radius-base": "20px",
    "@btn-height-base": "auto",
    "@btn-font-size-lg": "14px",
    "@layout-body-background": "#f5f8fb",
    "@text-color": "#353f51",
    "@layout-sider-background": "#7b9cc6",
    "@layout-trigger-background": "#4c75b3",
    "@menu-dark-bg": "#7b9cc6",
    "@menu-dark-submenu-bg": "#7b9cc6",
    "@table-header-bg": "#fff",
    "@input-border-color": "#d5e3f6",
    "@border-color-base": "#d5e3f6"
  },
  "autoprefixer": null,
  "proxy": {
    "/api": {
      "target": "http://jsonplaceholder.typicode.com/",
      "changeOrigin": true,
      "pathRewrite": { "^/api" : "" }
    },
    "/clms/boss/returnOrder": {
      "target": "http://10.1.1.182:8091/mockjsdata/5",
      "changeOrigin": true,
      "secure": false
    }
  },
  "extraBabelPlugins": [
    "transform-runtime",
    ["import", { "libraryName": "antd", "style": true }]
  ],
  "env": {
    "development": {
      "extraBabelPlugins": [
        "dva-hmr"
      ]
    }
  },
  "xdllPlugin": {
    "exclude": [
      "babel-runtime"
    ],
    "include": [
      "dva/router",
      "dva/saga",
      "dva/fetch"
    ]
  }
}

  

以上是.roadhogrc的配置

------------/^(?!.*\.(css|js)).*$/  正则不包含的css或者js 的正则

dva+antd写的一个react例子--服务器nginx 的配置

标签:trigger   theme   extra   logs   put   top   als   col   nbsp   

原文地址:http://www.cnblogs.com/shenggen/p/7545054.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!