vite-plugin-fvtt 0.2.9 → 0.2.10
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 +9 -2
- package/dist/index.mjs +6 -3
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## [
|
|
3
|
+
## [Unreleased]
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- Middleware now returns an empty CSS asset instead of a 404, when Vite handles style injection.
|
|
8
|
+
- Added inline documentation to clarify Vite option interactions affecting CSS generation.
|
|
9
|
+
|
|
10
|
+
## [0.2.9] - 2025-11-27
|
|
4
11
|
|
|
5
12
|
### Fixed
|
|
6
13
|
|
|
@@ -145,7 +152,7 @@
|
|
|
145
152
|
- Initial Release
|
|
146
153
|
|
|
147
154
|
[unreleased]: https://github.com/MatyeusM/vite-plugin-fvtt/compare/v0.2.9...HEAD
|
|
148
|
-
[0.2.
|
|
155
|
+
[0.2.9]: https://github.com/MatyeusM/vite-plugin-fvtt/compare/v0.2.8...v0.2.9
|
|
149
156
|
[0.2.8]: https://github.com/MatyeusM/vite-plugin-fvtt/compare/v0.2.7...v0.2.8
|
|
150
157
|
[0.2.7]: https://github.com/MatyeusM/vite-plugin-fvtt/compare/v0.2.6...v0.2.7
|
|
151
158
|
[0.2.6]: https://github.com/MatyeusM/vite-plugin-fvtt/compare/v0.2.5...v0.2.6
|
package/dist/index.mjs
CHANGED
|
@@ -500,9 +500,12 @@ function httpMiddlewareHook(server) {
|
|
|
500
500
|
next();
|
|
501
501
|
return;
|
|
502
502
|
}
|
|
503
|
-
const
|
|
504
|
-
const cssEntry =
|
|
505
|
-
|
|
503
|
+
const cssEntryName = config.build.lib.cssFileName;
|
|
504
|
+
const cssEntry = cssEntryName ? localToFoundryVTTUrl(`${cssEntryName}.css`) : void 0;
|
|
505
|
+
const cssFileName = context.manifest?.styles[0] ?? "styles/bundle.css";
|
|
506
|
+
const cssFile = cssFileName ? localToFoundryVTTUrl(`${cssFileName}`) : void 0;
|
|
507
|
+
const normalizedPath = path.posix.normalize(request.url ?? "");
|
|
508
|
+
if (normalizedPath === cssEntry || normalizedPath == cssFile) {
|
|
506
509
|
info(`Blocking CSS entry to ${request.url}`);
|
|
507
510
|
response.setHeader("Content-Type", "text/css");
|
|
508
511
|
response.end("/* The cake is in another castle. */");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-plugin-fvtt",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.10",
|
|
4
4
|
"description": "A Vite plugin for module and system development for Foundry VTT",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vite",
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@eslint/js": "^9.39.1",
|
|
39
|
-
"@types/node": "^
|
|
39
|
+
"@types/node": "^25.0.1",
|
|
40
40
|
"eslint": "^9.39.1",
|
|
41
41
|
"eslint-plugin-sonarjs": "^3.0.5",
|
|
42
42
|
"eslint-plugin-unicorn": "^62.0.0",
|
|
43
43
|
"prettier": "^3.6.2",
|
|
44
|
-
"tsdown": "^0.
|
|
44
|
+
"tsdown": "^0.18.3",
|
|
45
45
|
"typescript": "^5.9.3",
|
|
46
46
|
"typescript-eslint": "^8.46.4",
|
|
47
47
|
"vite": "^7.2.2",
|