vite-plugin-fvtt 0.2.8 → 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 +17 -1
- package/dist/index.mjs +7 -4
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
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
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- i18n validator should only, ever, run during build commands.
|
|
15
|
+
- fixed `package.json` pointing to the wrong files. Thank you
|
|
16
|
+
[Daedalus11069](https://github.com/Daedalus11069).
|
|
17
|
+
|
|
3
18
|
## [0.2.8] - 2025-11-15
|
|
4
19
|
|
|
5
20
|
### Changed
|
|
@@ -136,7 +151,8 @@
|
|
|
136
151
|
|
|
137
152
|
- Initial Release
|
|
138
153
|
|
|
139
|
-
[unreleased]: https://github.com/MatyeusM/vite-plugin-fvtt/compare/v0.2.
|
|
154
|
+
[unreleased]: https://github.com/MatyeusM/vite-plugin-fvtt/compare/v0.2.9...HEAD
|
|
155
|
+
[0.2.9]: https://github.com/MatyeusM/vite-plugin-fvtt/compare/v0.2.8...v0.2.9
|
|
140
156
|
[0.2.8]: https://github.com/MatyeusM/vite-plugin-fvtt/compare/v0.2.7...v0.2.8
|
|
141
157
|
[0.2.7]: https://github.com/MatyeusM/vite-plugin-fvtt/compare/v0.2.6...v0.2.7
|
|
142
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. */");
|
|
@@ -699,7 +702,7 @@ async function foundryVTTPlugin({ buildPacks = true } = {}) {
|
|
|
699
702
|
if (buildPacks) await compileManifestPacks();
|
|
700
703
|
},
|
|
701
704
|
closeBundle() {
|
|
702
|
-
if ((context.manifest?.languages ?? []).length > 0) validator();
|
|
705
|
+
if ((context.manifest?.languages ?? []).length > 0 && context.config?.command === "build") validator();
|
|
703
706
|
},
|
|
704
707
|
load(id) {
|
|
705
708
|
const config = context.config;
|
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",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"author": "MatyeusM (https://github.com/MatyeusM)",
|
|
20
20
|
"type": "module",
|
|
21
|
-
"main": "dist/index.
|
|
22
|
-
"types": "dist/index.d.
|
|
21
|
+
"main": "dist/index.mjs",
|
|
22
|
+
"types": "dist/index.d.mts",
|
|
23
23
|
"files": [
|
|
24
24
|
"dist",
|
|
25
25
|
"CHANGELOG.md",
|
|
@@ -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",
|