Skip to content

Commit

Permalink
workflow: fix dev source map
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jan 18, 2021
1 parent b813b00 commit 1673fb6
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions packages/vite/bin/vite.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
#!/usr/bin/env node

if (!__dirname.includes('node_modules')) {
try {
// only available as dev dependency
require('source-map-support').install()
} catch (e) {}
}

global.__vite_start_time = Date.now()

// check debug mode first before requiring the CLI.
Expand All @@ -25,11 +33,6 @@ if (debugIndex > 0) {
process.env.VITE_DEBUG_FILTER = filter
}
}

try {
// only available as dev dependency
require('source-map-support').install()
} catch (e) {}
}

function start() {
Expand Down

0 comments on commit 1673fb6

Please sign in to comment.