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

Commit 13f1ca5

Browse files
committed
tweaks
1 parent ad82cc5 commit 13f1ca5

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"ts-jest": "^26.4.0",
5757
"typescript": "^4.1.3",
5858
"typescript-eslint-language-service": "^4.1.2",
59-
"vite": "2.0.0-beta.3",
59+
"vite": "2.0.0-beta.4",
6060
"vue": "^3.0.5",
6161
"vue-i18n": "^9.0.0-beta.18"
6262
},

src/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export function pluginI18n(
3434

3535
const parseOptions = getOptions(
3636
filename,
37-
config != null ? (config.mode as DevEnv) : 'development',
37+
config != null ? config.isProduction : false,
3838
query as Record<string, unknown>,
3939
options.forceStringify
4040
) as CodeGenOptions
@@ -104,10 +104,12 @@ function isCustomBlock(query: Record<string, unknown>): boolean {
104104

105105
function getOptions(
106106
filename: string,
107-
mode: DevEnv,
107+
isProduction: boolean,
108108
query: Record<string, unknown>,
109109
forceStringify = false
110110
): Record<string, unknown> {
111+
const mode: DevEnv = isProduction ? 'production' : 'production'
112+
111113
const baseOptions = {
112114
filename,
113115
forceStringify,

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7365,10 +7365,10 @@ verror@1.10.0:
73657365
core-util-is "1.0.2"
73667366
extsprintf "^1.2.0"
73677367

7368-
vite@2.0.0-beta.3:
7369-
version "2.0.0-beta.3"
7370-
resolved "https://registry.yarnpkg.com/vite/-/vite-2.0.0-beta.3.tgz#50b62a705749f1187d094b0f9a4dad9e1d7630a8"
7371-
integrity sha512-jY0H655nqpclHhk4gJJ6oINvX+REGzNqAOAaNbU3P2TDM6PxAWpXsvGjkC/DonkZtuV/m3q7UhACS/tm5hJ04A==
7368+
vite@2.0.0-beta.4:
7369+
version "2.0.0-beta.4"
7370+
resolved "https://registry.yarnpkg.com/vite/-/vite-2.0.0-beta.4.tgz#6ea8e08ae5e6b510548d02ec770d34046622aef7"
7371+
integrity sha512-V0HV6xyUPQ9ktJ8gLm0Et7zTFtp8WmISsH/K+FuGF3aJ4VJOlSYEaget1nHCauUPI7WDPe97suz7SCIVHW2iEg==
73727372
dependencies:
73737373
esbuild "^0.8.26"
73747374
postcss "^8.2.1"

0 commit comments

Comments
 (0)