Skip to content

Commit

Permalink
fix(cli): fix vite command NODE_ENV
Browse files Browse the repository at this point in the history
  • Loading branch information
haoziqaq committed Feb 15, 2023
1 parent 627d129 commit e3d84ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/varlet-cli/src/node/commands/vite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { build, createServer, type ViteDevServer } from 'vite'
export type ViteCommandMode = 'dev' | 'build'

export async function vite(mode: ViteCommandMode) {
process.env.NODE_ENV = mode === 'dev' ? 'development' : 'production'

const run = mode === 'build' ? build : createServer

const result = await run({
Expand Down
2 changes: 1 addition & 1 deletion packages/varlet-ui/src/avatar/Avatar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
</template>

<script lang="ts">
import { defineComponent, ref, onMounted, onUpdated, type Ref } from 'vue'
import Lazy from '../lazy'
import { defineComponent, ref, onMounted, onUpdated, type Ref } from 'vue'
import { props, internalSizeValidator, sizeValidator } from './props'
import { toSizeUnit } from '../utils/elements'
import { createNamespace, call } from '../utils/components'
Expand Down

0 comments on commit e3d84ce

Please sign in to comment.