@f-o-t/config 1.0.4 → 1.0.5
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.d.ts +4 -2
- package/dist/index.js +2 -0
- package/package.json +1 -1
- package/src/generators/package-json.ts +6 -2
package/dist/index.d.ts
CHANGED
|
@@ -161,11 +161,13 @@ interface BiomeConfig {
|
|
|
161
161
|
declare function generateBiomeConfig(config: ResolvedFotConfig): BiomeConfig;
|
|
162
162
|
/**
|
|
163
163
|
* Package.json configuration.
|
|
164
|
-
* Includes "import"
|
|
165
|
-
* under conditions like ["module", "browser", "import"].
|
|
164
|
+
* Includes "module" and "import" conditions so bundlers/Vite can resolve ESM entries
|
|
165
|
+
* under conditions like ["module", "browser", "development", "import"].
|
|
166
|
+
* The "module" condition is required by newer Vite/rolldown versions.
|
|
166
167
|
*/
|
|
167
168
|
interface PackageExport {
|
|
168
169
|
types: string;
|
|
170
|
+
module: string;
|
|
169
171
|
import: string;
|
|
170
172
|
default: string;
|
|
171
173
|
}
|
package/dist/index.js
CHANGED
|
@@ -84,6 +84,7 @@ function generatePackageJson(libraryName, version, config, customDependencies) {
|
|
|
84
84
|
const exports = {
|
|
85
85
|
".": {
|
|
86
86
|
types: "./dist/index.d.ts",
|
|
87
|
+
module: "./dist/index.js",
|
|
87
88
|
import: "./dist/index.js",
|
|
88
89
|
default: "./dist/index.js"
|
|
89
90
|
}
|
|
@@ -92,6 +93,7 @@ function generatePackageJson(libraryName, version, config, customDependencies) {
|
|
|
92
93
|
if (plugin.enabled !== false) {
|
|
93
94
|
exports[`./plugins/${plugin.name}`] = {
|
|
94
95
|
types: `./dist/plugins/${plugin.name}/index.d.ts`,
|
|
96
|
+
module: `./dist/plugins/${plugin.name}/index.js`,
|
|
95
97
|
import: `./dist/plugins/${plugin.name}/index.js`,
|
|
96
98
|
default: `./dist/plugins/${plugin.name}/index.js`
|
|
97
99
|
};
|
package/package.json
CHANGED
|
@@ -2,11 +2,13 @@ import type { ResolvedFotConfig } from "../types";
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Package.json export configuration.
|
|
5
|
-
* Includes "import"
|
|
6
|
-
* under conditions like ["module", "browser", "import"].
|
|
5
|
+
* Includes "module" and "import" conditions so bundlers/Vite can resolve ESM entries
|
|
6
|
+
* under conditions like ["module", "browser", "development", "import"].
|
|
7
|
+
* The "module" condition is required by newer Vite/rolldown versions.
|
|
7
8
|
*/
|
|
8
9
|
export interface PackageExport {
|
|
9
10
|
types: string;
|
|
11
|
+
module: string;
|
|
10
12
|
import: string;
|
|
11
13
|
default: string;
|
|
12
14
|
}
|
|
@@ -50,6 +52,7 @@ export function generatePackageJson(
|
|
|
50
52
|
const exports: Record<string, PackageExport> = {
|
|
51
53
|
".": {
|
|
52
54
|
types: "./dist/index.d.ts",
|
|
55
|
+
module: "./dist/index.js",
|
|
53
56
|
import: "./dist/index.js",
|
|
54
57
|
default: "./dist/index.js",
|
|
55
58
|
},
|
|
@@ -60,6 +63,7 @@ export function generatePackageJson(
|
|
|
60
63
|
if (plugin.enabled !== false) {
|
|
61
64
|
exports[`./plugins/${plugin.name}`] = {
|
|
62
65
|
types: `./dist/plugins/${plugin.name}/index.d.ts`,
|
|
66
|
+
module: `./dist/plugins/${plugin.name}/index.js`,
|
|
63
67
|
import: `./dist/plugins/${plugin.name}/index.js`,
|
|
64
68
|
default: `./dist/plugins/${plugin.name}/index.js`,
|
|
65
69
|
};
|