@vocab/vite 0.2.1 → 0.2.3

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.
@@ -44,7 +44,9 @@ const createVocabChunks = (id, {
44
44
  if (isEntry || dynamicImporters.length > 0) {
45
45
  dependentEntryPoints.push(moduleId);
46
46
  }
47
- for (const importerId of importers) idsToHandle.add(importerId);
47
+ for (const importerId of importers) {
48
+ idsToHandle.add(importerId);
49
+ }
48
50
  }
49
51
  if (dependentEntryPoints.length > 0) {
50
52
  return getChunkName(language);
@@ -44,7 +44,9 @@ const createVocabChunks = (id, {
44
44
  if (isEntry || dynamicImporters.length > 0) {
45
45
  dependentEntryPoints.push(moduleId);
46
46
  }
47
- for (const importerId of importers) idsToHandle.add(importerId);
47
+ for (const importerId of importers) {
48
+ idsToHandle.add(importerId);
49
+ }
48
50
  }
49
51
  if (dependentEntryPoints.length > 0) {
50
52
  return getChunkName(language);
@@ -40,7 +40,9 @@ const createVocabChunks = (id, {
40
40
  if (isEntry || dynamicImporters.length > 0) {
41
41
  dependentEntryPoints.push(moduleId);
42
42
  }
43
- for (const importerId of importers) idsToHandle.add(importerId);
43
+ for (const importerId of importers) {
44
+ idsToHandle.add(importerId);
45
+ }
44
46
  }
45
47
  if (dependentEntryPoints.length > 0) {
46
48
  return getChunkName(language);
@@ -115,19 +115,25 @@ function vitePluginVocab({
115
115
  isSSR = Boolean(config.build.ssr);
116
116
  },
117
117
  resolveId(id) {
118
- if (isSSR) return null;
118
+ if (isSSR) {
119
+ return null;
120
+ }
119
121
  if (id.includes(virtualModuleId)) {
120
122
  return `\0${id}`;
121
123
  }
122
124
  },
123
125
  load(id) {
124
- if (isSSR) return null;
126
+ if (isSSR) {
127
+ return null;
128
+ }
125
129
  if (id.includes(`\0${virtualModuleId}`)) {
126
130
  return virtualResourceLoader(id);
127
131
  }
128
132
  },
129
133
  async transform(code, id) {
130
- if (isSSR) return null;
134
+ if (isSSR) {
135
+ return null;
136
+ }
131
137
  if (compiledVocabFileFilter.test(id)) {
132
138
  const transformedCode = await transformVocabFile(code, id, vocabConfig);
133
139
  return {
@@ -115,19 +115,25 @@ function vitePluginVocab({
115
115
  isSSR = Boolean(config.build.ssr);
116
116
  },
117
117
  resolveId(id) {
118
- if (isSSR) return null;
118
+ if (isSSR) {
119
+ return null;
120
+ }
119
121
  if (id.includes(virtualModuleId)) {
120
122
  return `\0${id}`;
121
123
  }
122
124
  },
123
125
  load(id) {
124
- if (isSSR) return null;
126
+ if (isSSR) {
127
+ return null;
128
+ }
125
129
  if (id.includes(`\0${virtualModuleId}`)) {
126
130
  return virtualResourceLoader(id);
127
131
  }
128
132
  },
129
133
  async transform(code, id) {
130
- if (isSSR) return null;
134
+ if (isSSR) {
135
+ return null;
136
+ }
131
137
  if (compiledVocabFileFilter.test(id)) {
132
138
  const transformedCode = await transformVocabFile(code, id, vocabConfig);
133
139
  return {
@@ -90,19 +90,25 @@ function vitePluginVocab({
90
90
  isSSR = Boolean(config.build.ssr);
91
91
  },
92
92
  resolveId(id) {
93
- if (isSSR) return null;
93
+ if (isSSR) {
94
+ return null;
95
+ }
94
96
  if (id.includes(virtualModuleId)) {
95
97
  return `\0${id}`;
96
98
  }
97
99
  },
98
100
  load(id) {
99
- if (isSSR) return null;
101
+ if (isSSR) {
102
+ return null;
103
+ }
100
104
  if (id.includes(`\0${virtualModuleId}`)) {
101
105
  return virtualResourceLoader(id);
102
106
  }
103
107
  },
104
108
  async transform(code, id) {
105
- if (isSSR) return null;
109
+ if (isSSR) {
110
+ return null;
111
+ }
106
112
  if (compiledVocabFileFilter.test(id)) {
107
113
  const transformedCode = await transformVocabFile(code, id, vocabConfig);
108
114
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vocab/vite",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "author": "SEEK",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -42,13 +42,13 @@
42
42
  "debug": "^4.3.1",
43
43
  "es-module-lexer": "^1.0.0",
44
44
  "picocolors": "^1.0.0",
45
- "@vocab/core": "^1.6.3"
45
+ "@vocab/core": "^1.6.4"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@types/debug": "^4.1.5",
49
- "vite": "^6.3.5"
49
+ "vite": "^7.0.6"
50
50
  },
51
51
  "peerDependencies": {
52
- "vite": "^5.4.8 || ^6.0.0"
52
+ "vite": "^5.4.8 || ^6.0.0 || ^7.0.0"
53
53
  }
54
54
  }