quickbundle 2.0.0 → 2.1.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.
Files changed (2) hide show
  1. package/dist/index.js +5 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -73,7 +73,7 @@ const createConfigurations = (options = {
73
73
  "require",
74
74
  "types"
75
75
  ];
76
- return Object.entries(PKG.exports).flatMap(([name, entryPoints])=>{
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")) {
@@ -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 targetted 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.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "The zero-configuration transpiler and bundler for the web",
5
5
  "author": {
6
6
  "name": "Ayoub Adib",