Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ Vue.use(borderBox1)

[UMD版使用示例](./umdExample.html)

### 使用Vite

* 安装以下依赖,并将```vite.config.js```复制至项目目录即可。

```bash
npm install @vitejs/plugin-vue2 less -D
```

### TODO

* **地图组件**
Expand Down
8 changes: 8 additions & 0 deletions README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ The `UMD` version can be directly imported using the `script` tag. The `UMD` ver

[UMD version usage example](./umdExample.html)

### Use Vite

* Install below dependencies and take the ```vite.config.js``` to you project directory just done.

```bash
npm install @vitejs/plugin-vue2 less -D
```

### React version

The reaction version is already under development, so stay tuned
Expand Down
21 changes: 21 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import {defineConfig} from 'vite';
import vue from '@vitejs/plugin-vue2'

// https://vitejs.dev/config
export default defineConfig({
resolve: {
alias: [
{
find: /@jiaminghi\/.+/, replacement: path => {
path = path.replace('lib', 'src')
if (/^[^/]+$/.test(path))
path = `${path}/src`
else if (/\.css$/.test(path))
path = path.replace('src/components', 'lib/components')
return path
}
},
]
},
plugins: [vue()],
});