Explorar el Código

deploy

master
Soleilw hace 1 año
padre
commit
6abe6085fb
Se han modificado 2 ficheros con 22 adiciones y 1 borrados
  1. 21
    0
      config/config.ts
  2. 1
    1
      package.json

+ 21
- 0
config/config.ts Ver fichero

import { defineConfig } from '@umijs/max'; import { defineConfig } from '@umijs/max';
import routes from './routes'; import routes from './routes';


const mode = process.env.mode;
let options = {};
if(mode === 'development') {
options = {
define: {
"process.env": {
NODE_ENV: JSON.stringify(mode)
}
}
}
} else if (mode === 'production') {
options = {
define: {
"process.env": {
NODE_ENV: JSON.stringify(mode)
}
}
}
}

export default defineConfig({ export default defineConfig({
options,
dva: {}, dva: {},
antd: {}, antd: {},
access: { access: {

+ 1
- 1
package.json Ver fichero

"author": "Soleilw <a617759082@126.com>", "author": "Soleilw <a617759082@126.com>",
"scripts": { "scripts": {
"build": "max build", "build": "max build",
"build:dev": "UMI_ENV=dev max build",
"build:dev": "cross-env mode=development max build",
"dev": "max dev", "dev": "max dev",
"format": "prettier --cache --write .", "format": "prettier --cache --write .",
"postinstall": "max setup", "postinstall": "max setup",

Cargando…
Cancelar
Guardar