quickbundle 2.5.1 → 2.5.2
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.mjs +12 -13
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -43,7 +43,7 @@ const build = async (configurations)=>{
|
|
|
43
43
|
promises.push(new Promise((resolve, reject)=>{
|
|
44
44
|
bundle.write(outputEntry).then(()=>{
|
|
45
45
|
resolve({
|
|
46
|
-
|
|
46
|
+
elapsedTime: Date.now() - initialTime,
|
|
47
47
|
filename: outputFilename
|
|
48
48
|
});
|
|
49
49
|
}).catch(reject);
|
|
@@ -143,15 +143,6 @@ const getPlugins = (...customPlugins)=>{
|
|
|
143
143
|
optDeps: true,
|
|
144
144
|
peerDeps: true
|
|
145
145
|
}),
|
|
146
|
-
nodeResolve({
|
|
147
|
-
/**
|
|
148
|
-
* The `exports` conditional fields definition order is important in the `package.json file`.
|
|
149
|
-
* To be resolved first, `types` field must always come first in the package.json exports definition.
|
|
150
|
-
* @see https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/#package-json-exports-imports-and-self-referencing.
|
|
151
|
-
*/ exportConditions: [
|
|
152
|
-
"types"
|
|
153
|
-
]
|
|
154
|
-
}),
|
|
155
146
|
commonjs(),
|
|
156
147
|
url(),
|
|
157
148
|
json(),
|
|
@@ -179,7 +170,7 @@ const createMainConfig = (entryPoints, options)=>{
|
|
|
179
170
|
return {
|
|
180
171
|
input: entryPoints.source,
|
|
181
172
|
output,
|
|
182
|
-
plugins: getPlugins(swc({
|
|
173
|
+
plugins: getPlugins(nodeResolve(), swc({
|
|
183
174
|
minify: minification,
|
|
184
175
|
sourceMaps
|
|
185
176
|
}))
|
|
@@ -193,7 +184,15 @@ const createTypesConfig = (entryPoints)=>{
|
|
|
193
184
|
file: entryPoints.types
|
|
194
185
|
}
|
|
195
186
|
],
|
|
196
|
-
plugins: getPlugins(
|
|
187
|
+
plugins: getPlugins(nodeResolve({
|
|
188
|
+
/**
|
|
189
|
+
* The `exports` conditional fields definition order is important in the `package.json file`.
|
|
190
|
+
* To be resolved first, `types` field must always come first in the package.json exports definition.
|
|
191
|
+
* @see https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/#package-json-exports-imports-and-self-referencing.
|
|
192
|
+
*/ exportConditions: [
|
|
193
|
+
"types"
|
|
194
|
+
]
|
|
195
|
+
}), dts({
|
|
197
196
|
compilerOptions: {
|
|
198
197
|
incremental: false
|
|
199
198
|
},
|
|
@@ -252,7 +251,7 @@ const createBuildCommand = (program)=>{
|
|
|
252
251
|
`${item.rawSize.toString().padStart(padding)} B raw`,
|
|
253
252
|
`${item.compressedSize.toString().padStart(padding)} B gz`
|
|
254
253
|
], {
|
|
255
|
-
label: `${item.filename} (took ${item.
|
|
254
|
+
label: `${item.filename} (took ${item.elapsedTime}ms)`,
|
|
256
255
|
type: "information"
|
|
257
256
|
});
|
|
258
257
|
});
|