litestar-vite-plugin 0.2.1 → 0.3.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 CHANGED
@@ -71,7 +71,6 @@ function resolveLitestarPlugin(pluginConfig) {
71
71
  ensureCommandShouldRunInEnvironment(command, env);
72
72
  return {
73
73
  base: userConfig.base ?? (command === "build" ? resolveBase(pluginConfig, assetUrl) : pluginConfig.assetUrl),
74
- root: pluginConfig.rootDirectory,
75
74
  publicDir: userConfig.publicDir ?? false,
76
75
  build: {
77
76
  manifest: userConfig.build?.manifest ?? !ssr,
@@ -243,14 +242,6 @@ function resolvePluginConfig(config) {
243
242
  );
244
243
  }
245
244
  }
246
- if (typeof config.rootDirectory === "string") {
247
- config.rootDirectory = config.rootDirectory.trim().replace(/^\/+/, "");
248
- if (config.rootDirectory === "") {
249
- throw new Error(
250
- "litestar-vite-plugin: rootDirectory must be a subdirectory. E.g. '.'."
251
- );
252
- }
253
- }
254
245
  if (typeof config.assetDirectory === "string") {
255
246
  config.assetDirectory = config.assetDirectory.trim().replace(/^\/+/, "");
256
247
  if (config.assetDirectory === "") {
@@ -275,7 +266,6 @@ function resolvePluginConfig(config) {
275
266
  }
276
267
  return {
277
268
  input: config.input,
278
- rootDirectory: config.rootDirectory ?? process.cwd(),
279
269
  assetUrl: config.assetUrl || (config.assetUrl ?? "static"),
280
270
  resourceDirectory: config.resourceDirectory ?? "/resources/",
281
271
  assetDirectory: config.assetDirectory ?? "assets",
package/dist/index.d.ts CHANGED
@@ -17,16 +17,10 @@ interface PluginConfig {
17
17
  * @default 'public/dist'
18
18
  */
19
19
  bundleDirectory?: string;
20
- /**
21
- * The root directory for your project.
22
- *
23
- * @default ''
24
- */
25
- rootDirectory?: string;
26
20
  /**
27
21
  * Litestar's public assets directory. These are the assets that Vite will serve when developing.
28
22
  *
29
- * @default '${rootDirectory}/resources'
23
+ * @default 'resources'
30
24
  */
31
25
  resourceDirectory?: string;
32
26
  /**
package/dist/index.mjs CHANGED
@@ -42,7 +42,6 @@ function resolveLitestarPlugin(pluginConfig) {
42
42
  ensureCommandShouldRunInEnvironment(command, env);
43
43
  return {
44
44
  base: userConfig.base ?? (command === "build" ? resolveBase(pluginConfig, assetUrl) : pluginConfig.assetUrl),
45
- root: pluginConfig.rootDirectory,
46
45
  publicDir: userConfig.publicDir ?? false,
47
46
  build: {
48
47
  manifest: userConfig.build?.manifest ?? !ssr,
@@ -214,14 +213,6 @@ function resolvePluginConfig(config) {
214
213
  );
215
214
  }
216
215
  }
217
- if (typeof config.rootDirectory === "string") {
218
- config.rootDirectory = config.rootDirectory.trim().replace(/^\/+/, "");
219
- if (config.rootDirectory === "") {
220
- throw new Error(
221
- "litestar-vite-plugin: rootDirectory must be a subdirectory. E.g. '.'."
222
- );
223
- }
224
- }
225
216
  if (typeof config.assetDirectory === "string") {
226
217
  config.assetDirectory = config.assetDirectory.trim().replace(/^\/+/, "");
227
218
  if (config.assetDirectory === "") {
@@ -246,7 +237,6 @@ function resolvePluginConfig(config) {
246
237
  }
247
238
  return {
248
239
  input: config.input,
249
- rootDirectory: config.rootDirectory ?? process.cwd(),
250
240
  assetUrl: config.assetUrl || (config.assetUrl ?? "static"),
251
241
  resourceDirectory: config.resourceDirectory ?? "/resources/",
252
242
  assetDirectory: config.assetDirectory ?? "assets",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "litestar-vite-plugin",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "description": "Litestar plugin for Vite.",
5
5
  "keywords": [
6
6
  "litestar",