quickbundle 2.0.0 → 2.2.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.js +6 -2
- package/package.json +9 -1
package/dist/index.js
CHANGED
|
@@ -73,13 +73,13 @@ const createConfigurations = (options = {
|
|
|
73
73
|
"require",
|
|
74
74
|
"types"
|
|
75
75
|
];
|
|
76
|
-
|
|
76
|
+
const output = Object.entries(PKG.exports).flatMap(([name, entryPoints])=>{
|
|
77
77
|
if (typeof entryPoints === "string") return [];
|
|
78
78
|
const entryPointKeys = Object.keys(entryPoints);
|
|
79
79
|
if (entryPointKeys.includes("source")) {
|
|
80
80
|
const hasAtLeastOneRequiredField = outputEntryPointFields.some((field)=>entryPointKeys.includes(field));
|
|
81
81
|
if (!hasAtLeastOneRequiredField) {
|
|
82
|
-
throw new Error(`A \`source\` field is defined without a provided \`${name}\`
|
|
82
|
+
throw new Error(`A \`source\` field is defined without a provided output target for the \`${name}\` export. Make sure to define at least one entry point (including ${outputEntryPointFields.join(", ")})`);
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
return [
|
|
@@ -93,6 +93,10 @@ const createConfigurations = (options = {
|
|
|
93
93
|
})
|
|
94
94
|
].filter(Boolean);
|
|
95
95
|
});
|
|
96
|
+
if (output.length === 0) {
|
|
97
|
+
throw new Error("No `source` field is set for the targeted package. If a build step is necessary, make sure to configure at least one `source` field in the package `exports` contract.");
|
|
98
|
+
}
|
|
99
|
+
return output;
|
|
96
100
|
};
|
|
97
101
|
const getPlugins = (...customPlugins)=>{
|
|
98
102
|
return [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quickbundle",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "The zero-configuration transpiler and bundler for the web",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Ayoub Adib",
|
|
@@ -38,6 +38,14 @@
|
|
|
38
38
|
"import": "./dist/index.js"
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
|
+
"peerDependencies": {
|
|
42
|
+
"typescript": ">=4.7.0"
|
|
43
|
+
},
|
|
44
|
+
"peerDependenciesMeta": {
|
|
45
|
+
"typescript": {
|
|
46
|
+
"optional": true
|
|
47
|
+
}
|
|
48
|
+
},
|
|
41
49
|
"dependencies": {
|
|
42
50
|
"@rollup/plugin-commonjs": "^28.0.0",
|
|
43
51
|
"@rollup/plugin-json": "^6.1.0",
|