react-cosmos-plugin-vite 6.0.0-beta.1 → 6.0.0-beta.3

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.
@@ -1,5 +1,5 @@
1
1
  import path from 'node:path';
2
- import { fileExists, moduleExists, resolveLoose, } from 'react-cosmos';
2
+ import { fileExists, resolveFromSilent, resolveLoose, } from 'react-cosmos';
3
3
  export function createCosmosViteConfig(cosmosConfig) {
4
4
  const { rootDir } = cosmosConfig;
5
5
  const configInput = cosmosConfig.vite || {};
@@ -24,8 +24,9 @@ function getViteConfigPath({ configPath }, rootDir) {
24
24
  return false;
25
25
  }
26
26
  if (typeof configPath == 'undefined') {
27
- const defaultAbsPath = resolveLoose(rootDir, 'vite.config.js');
28
- return moduleExists(defaultAbsPath) ? defaultAbsPath : false;
27
+ return (resolveFromSilent(rootDir, './vite.config.ts') ||
28
+ resolveFromSilent(rootDir, './vite.config.js') ||
29
+ false);
29
30
  }
30
31
  const absPath = resolveLoose(rootDir, configPath);
31
32
  if (!fileExists(absPath)) {
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "react-cosmos-plugin-vite",
3
- "version": "6.0.0-beta.1",
3
+ "version": "6.0.0-beta.3",
4
4
  "description": "Vite plugin for React Cosmos",
5
5
  "repository": "https://github.com/react-cosmos/react-cosmos/tree/main/packages/react-cosmos-plugin-vite",
6
6
  "license": "MIT",
7
7
  "type": "module",
8
8
  "main": "cosmos.plugin.json",
9
9
  "dependencies": {
10
- "react-cosmos-core": "6.0.0-beta.1",
11
- "react-cosmos-dom": "6.0.0-beta.1"
10
+ "react-cosmos-core": "6.0.0-beta.3",
11
+ "react-cosmos-dom": "6.0.0-beta.3"
12
12
  },
13
13
  "peerDependencies": {
14
14
  "vite": "*"
15
15
  },
16
- "gitHead": "960ef665baa732f71ac8dd6cf19e4500d9cff8b8"
16
+ "gitHead": "7f33cc2b818523978ef6c7fe574bf1fd8d15b50a"
17
17
  }