vite-node 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.mjs +7 -3
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -9,15 +9,16 @@ import minimist from 'minimist'
9
9
  import { red, dim, yellow, green, inverse, cyan } from 'kolorist'
10
10
 
11
11
  const argv = minimist(process.argv.slice(2), {
12
- alias: {
12
+ 'alias': {
13
13
  r: 'root',
14
14
  c: 'config',
15
15
  h: 'help',
16
16
  w: 'watch',
17
17
  s: 'silent',
18
18
  },
19
- string: ['root', 'config'],
20
- boolean: ['help', 'vue', 'watch', 'silent'],
19
+ '--': true,
20
+ 'string': ['root', 'config'],
21
+ 'boolean': ['help', 'vue', 'watch', 'silent'],
21
22
  unknown(name) {
22
23
  if (name[0] === '-') {
23
24
  console.error(red(`Unknown argument: ${name}`))
@@ -39,6 +40,9 @@ if (!argv._.length) {
39
40
  process.exit(1)
40
41
  }
41
42
 
43
+ // forward argv
44
+ process.argv = [process.argv.slice(0, 2), ...argv['--']]
45
+
42
46
  const debugRequest = createDebug('vite-node:request')
43
47
  const debugTransform = createDebug('vite-node:transform')
44
48
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-node",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Vite as Node runtime",
5
5
  "keywords": [
6
6
  "vite"