Skip to content

Commit

Permalink
fix(build): remove __DEV__
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Nov 1, 2022
1 parent 7161586 commit a50b713
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 0 additions & 2 deletions src/core/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,5 +205,3 @@ function mergeDeep(...objects: Array<Record<any, any>>): Record<any, any> {
return prev
}, {})
}

export const __DEV__ = process.env.NODE_ENV !== 'production'
2 changes: 1 addition & 1 deletion src/data-fetching/dataFetchingGuard.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { DataLoader, isDataLoader } from './defineLoader'
import type { RouteLocationNormalized, Router } from 'vue-router'
import { Awaitable, __DEV__ } from '../core/utils'
import { Awaitable } from '../core/utils'

// Symbol used to detect if a route has loaders
export const HasDataLoaderMeta = Symbol()
Expand Down
1 change: 1 addition & 0 deletions src/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare const __DEV__: boolean
3 changes: 3 additions & 0 deletions tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import { defineConfig } from 'tsup'
export default defineConfig({
entry: ['src/*.ts'],
clean: true,
define: {
__DEV__: "process.env.NODE_ENV !== 'production'",
},
format: ['cjs', 'esm'],
dts: true,
external: ['@vue/compiler-sfc', 'vue', 'vue-router'],
Expand Down

0 comments on commit a50b713

Please sign in to comment.