@modular-css/vite 30.0.5 → 30.1.0
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.
- package/CHANGELOG.md +14 -0
- package/package.json +4 -4
- package/vite.js +8 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 30.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#1024](https://github.com/tivac/modular-css/pull/1024) [`1c9322f`](https://github.com/tivac/modular-css/commit/1c9322fd9a39d05da01df8a8c6bd43e9218f9df1) Thanks [@tivac](https://github.com/tivac)! - Vite 6 support
|
|
8
|
+
|
|
9
|
+
## 30.0.6
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [[`d9db40b`](https://github.com/tivac/modular-css/commit/d9db40b08355ec13b7929edcb27dd1bc58454513)]:
|
|
14
|
+
- @modular-css/processor@29.0.4
|
|
15
|
+
- @modular-css/css-to-js@29.0.6
|
|
16
|
+
|
|
3
17
|
## 30.0.5
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modular-css/vite",
|
|
3
|
-
"version": "30.0
|
|
3
|
+
"version": "30.1.0",
|
|
4
4
|
"description": "vite support for modular-css",
|
|
5
5
|
"main": "./vite.js",
|
|
6
6
|
"repository": {
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
"postcss"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@modular-css/css-to-js": "^29.0.
|
|
30
|
-
"@modular-css/processor": "^29.0.
|
|
29
|
+
"@modular-css/css-to-js": "^29.0.6",
|
|
30
|
+
"@modular-css/processor": "^29.0.4",
|
|
31
31
|
"@rollup/pluginutils": "^5.0.2"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"vite": "^3 || ^4 || ^5"
|
|
34
|
+
"vite": "^3 || ^4 || ^5 || ^6"
|
|
35
35
|
}
|
|
36
36
|
}
|
package/vite.js
CHANGED
|
@@ -151,7 +151,7 @@ module.exports = (
|
|
|
151
151
|
},
|
|
152
152
|
|
|
153
153
|
// Load the virtual CSS files
|
|
154
|
-
async load(id
|
|
154
|
+
async load(id) {
|
|
155
155
|
log("load", id);
|
|
156
156
|
|
|
157
157
|
// Only want this to run for the virtual CSS modules
|
|
@@ -168,24 +168,25 @@ module.exports = (
|
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
if(viteServer) {
|
|
171
|
-
const
|
|
171
|
+
const { moduleGraph } = this.environment || viteServer;
|
|
172
|
+
const thisModule = moduleGraph.getModuleById(id);
|
|
173
|
+
|
|
172
174
|
const deps = graph.directDependenciesOf(fileKey(normalize(file)));
|
|
173
175
|
const imported = filterByPrefix(FILE_PREFIX, deps).map((dep) => virtualize(slash(dep)));
|
|
174
176
|
|
|
175
|
-
await Promise.all(imported.map((dep) =>
|
|
177
|
+
await Promise.all(imported.map((dep) => moduleGraph.ensureEntryFromUrl(dep)));
|
|
176
178
|
|
|
177
179
|
log("load deps", id, "=>", imported);
|
|
178
180
|
|
|
179
181
|
const hmrDeps = imported;
|
|
180
182
|
|
|
181
|
-
await
|
|
182
|
-
|
|
183
|
+
await moduleGraph.updateModuleInfo(
|
|
184
|
+
thisModule,
|
|
183
185
|
new Set(imported),
|
|
184
186
|
null,
|
|
185
187
|
new Set(hmrDeps),
|
|
186
188
|
null,
|
|
187
|
-
|
|
188
|
-
Boolean(opts.ssr),
|
|
189
|
+
false,
|
|
189
190
|
);
|
|
190
191
|
}
|
|
191
192
|
|