Skip to content
This repository was archived by the owner on Jul 4, 2021. It is now read-only.

Commit 677b3ca

Browse files
committed
improve dev scripts
1 parent 0338bd9 commit 677b3ca

File tree

4 files changed

+43
-3
lines changed

4 files changed

+43
-3
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import path from 'path'
2+
import { defineConfig } from 'vite'
3+
import vue from '@vitejs/plugin-vue'
4+
import vueI18n from '../../src/index'
5+
6+
export default defineConfig({
7+
plugins: [
8+
vue(),
9+
vueI18n({
10+
include: path.resolve(__dirname, './locales/**'),
11+
compositionOnly: true
12+
})
13+
]
14+
})

examples/global/vite.config.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { defineConfig } from 'vite'
2+
import vue from '@vitejs/plugin-vue'
3+
import vueI18n from '../../src/index'
4+
5+
export default defineConfig({
6+
plugins: [
7+
vue(),
8+
vueI18n({
9+
compositionOnly: true
10+
})
11+
]
12+
})

examples/legacy/vite.config.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import path from 'path'
2+
import { defineConfig } from 'vite'
3+
import vue from '@vitejs/plugin-vue'
4+
import vueI18n from '../../src/index'
5+
6+
export default defineConfig({
7+
plugins: [
8+
vue(),
9+
vueI18n({
10+
include: path.resolve(__dirname, './locales/**'),
11+
compositionOnly: false
12+
})
13+
]
14+
})

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@
9595
"clean:lib": "rm -rf ./lib/index.js",
9696
"coverage": "opener coverage/lcov-report/index.html",
9797
"dev": "vite examples --config ./examples/vite.config.ts",
98-
"dev:composition": "vite examples/composition --config ./examples/vite.config.ts",
99-
"dev:global": "vite examples/global --config ./examples/vite.config.ts",
100-
"dev:legacy": "vite examples/legacy --config ./examples/vite.config.ts",
98+
"dev:composition": "vite examples/composition --config ./examples/composition/vite.config.ts",
99+
"dev:global": "vite examples/global --config ./examples/global/vite.config.ts",
100+
"dev:legacy": "vite examples/legacy --config ./examples/legacy/vite.config.ts",
101101
"fix": "npm-run-all --parallel lint:fix format:fix",
102102
"format": "prettier --config .prettierrc --ignore-path .prettierignore '**/*.{js,json,html}'",
103103
"format:fix": "yarn format --write",

0 commit comments

Comments
 (0)