litestar-vite-plugin 0.3.1 → 0.4.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/dist/index.cjs +0 -9
- package/dist/index.d.ts +0 -6
- package/dist/index.mjs +0 -9
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -242,14 +242,6 @@ function resolvePluginConfig(config) {
|
|
|
242
242
|
);
|
|
243
243
|
}
|
|
244
244
|
}
|
|
245
|
-
if (typeof config.assetDirectory === "string") {
|
|
246
|
-
config.assetDirectory = config.assetDirectory.trim().replace(/^\/+/, "");
|
|
247
|
-
if (config.assetDirectory === "") {
|
|
248
|
-
throw new Error(
|
|
249
|
-
"litestar-vite-plugin: assetDirectory must be a subdirectory. E.g. 'assets'."
|
|
250
|
-
);
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
245
|
if (typeof config.bundleDirectory === "string") {
|
|
254
246
|
config.bundleDirectory = config.bundleDirectory.trim().replace(/^\/+/, "").replace(/\/+$/, "");
|
|
255
247
|
if (config.bundleDirectory === "") {
|
|
@@ -268,7 +260,6 @@ function resolvePluginConfig(config) {
|
|
|
268
260
|
input: config.input,
|
|
269
261
|
assetUrl: config.assetUrl || (config.assetUrl ?? "static"),
|
|
270
262
|
resourceDirectory: config.resourceDirectory ?? "/resources/",
|
|
271
|
-
assetDirectory: config.assetDirectory ?? import_path.default.join(config.resourceDirectory ?? "/resources/", "assets"),
|
|
272
263
|
bundleDirectory: config.bundleDirectory || (config.bundleDirectory ?? "public"),
|
|
273
264
|
ssr: config.ssr ?? config.input,
|
|
274
265
|
ssrOutputDirectory: config.ssrOutputDirectory ?? import_path.default.join(config.resourceDirectory ?? "resources", "bootstrap/ssr"),
|
package/dist/index.d.ts
CHANGED
|
@@ -23,12 +23,6 @@ interface PluginConfig {
|
|
|
23
23
|
* @default 'resources'
|
|
24
24
|
*/
|
|
25
25
|
resourceDirectory?: string;
|
|
26
|
-
/**
|
|
27
|
-
* Litestar's public assets directory. These are the assets that Vite will serve when developing.
|
|
28
|
-
*
|
|
29
|
-
* @default '${resourceDirectory}/assets'
|
|
30
|
-
*/
|
|
31
|
-
assetDirectory?: string;
|
|
32
26
|
/**
|
|
33
27
|
* The path to the "hot" file.
|
|
34
28
|
*
|
package/dist/index.mjs
CHANGED
|
@@ -213,14 +213,6 @@ function resolvePluginConfig(config) {
|
|
|
213
213
|
);
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
|
-
if (typeof config.assetDirectory === "string") {
|
|
217
|
-
config.assetDirectory = config.assetDirectory.trim().replace(/^\/+/, "");
|
|
218
|
-
if (config.assetDirectory === "") {
|
|
219
|
-
throw new Error(
|
|
220
|
-
"litestar-vite-plugin: assetDirectory must be a subdirectory. E.g. 'assets'."
|
|
221
|
-
);
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
216
|
if (typeof config.bundleDirectory === "string") {
|
|
225
217
|
config.bundleDirectory = config.bundleDirectory.trim().replace(/^\/+/, "").replace(/\/+$/, "");
|
|
226
218
|
if (config.bundleDirectory === "") {
|
|
@@ -239,7 +231,6 @@ function resolvePluginConfig(config) {
|
|
|
239
231
|
input: config.input,
|
|
240
232
|
assetUrl: config.assetUrl || (config.assetUrl ?? "static"),
|
|
241
233
|
resourceDirectory: config.resourceDirectory ?? "/resources/",
|
|
242
|
-
assetDirectory: config.assetDirectory ?? path.join(config.resourceDirectory ?? "/resources/", "assets"),
|
|
243
234
|
bundleDirectory: config.bundleDirectory || (config.bundleDirectory ?? "public"),
|
|
244
235
|
ssr: config.ssr ?? config.input,
|
|
245
236
|
ssrOutputDirectory: config.ssrOutputDirectory ?? path.join(config.resourceDirectory ?? "resources", "bootstrap/ssr"),
|