1.1.6 • Published 1 year ago

vite-plugin-upload-server v1.1.6

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

install

npm install vite-plugin-upload-server
or
yarn add vite-plugin-upload-server

Use

// vite.config.ts

/**
 * @host 服务器地址
 * @username 用户名
 * @password 密码
 * @filePath 服务器上项目的目录
 */

/**
 * @command
 * @mode
 * @server
 * @build
 * @cleanFiles 是否需要清理目录
 */

const server = {
  development: {
    host: '',
    username: '',
    password: '',
    filePath: '',
  },
  test: {
    host: '',
    username: '',
    password: '',
    filePath: '',
  },
  production: {
    host: '',
    username: '',
    password: '',
    filePath: '',
  },
}

export default defineConfig(({ command, mode }) => {
  return {
    plugins: [
      uploadServerPlugin({
        command,
        mode,
        build: './dist',
        server,
      }),
    ],
  }
})

// package.json
```json
"scripts": {
"start": "vite",
"preview": "vite preview",
"build:dev": "tsc && vite build --mode development",
"build:test": "tsc && vite build --mode test",
"build:prod": "tsc && vite build --mode production"
},
1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.1

1 year ago

1.1.0

2 years ago

1.0.9

2 years ago

1.1.2

1 year ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago