quickbundle 2.5.0 → 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/README.md +4 -0
- package/dist/index.mjs +13 -14
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -43,6 +43,8 @@ yarn add quickbundle
|
|
|
43
43
|
```jsonc
|
|
44
44
|
{
|
|
45
45
|
"name": "lib", // Package name
|
|
46
|
+
"type": "module", // Optional if you want Node-like runtime to process by default `.js` file as ESM modules.
|
|
47
|
+
"sideEffects": false, // Mark the package as a side-effect-free one to support the consumer dead-code elimination (tree-shaking) process. If your library contains global side effects (ideally, it should be avoided), configure the field to list the files that do have side effects.
|
|
46
48
|
"exports": {
|
|
47
49
|
".": {
|
|
48
50
|
"source": "src/index.ts(x)?", // Source code entry point.
|
|
@@ -66,6 +68,8 @@ yarn add quickbundle
|
|
|
66
68
|
```jsonc
|
|
67
69
|
{
|
|
68
70
|
"name": "lib", // Package name
|
|
71
|
+
"type": "module", // Optional if you want Node-like runtime to process by default `.js` file as ESM modules.
|
|
72
|
+
"sideEffects": false, // Mark the package as a side-effect-free one to support the consumer dead-code elimination (tree-shaking) process. If your library contains global side effects (ideally, it should be avoided), configure the field to list the files that do have side effects.
|
|
69
73
|
"exports": {
|
|
70
74
|
".": {
|
|
71
75
|
"source": "src/index.ts(x)?", // Source code entry point.
|
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
|
});
|
|
@@ -337,7 +336,7 @@ const createWatchCommand = (program)=>{
|
|
|
337
336
|
};
|
|
338
337
|
|
|
339
338
|
const createProgram = (...commandBuilders)=>{
|
|
340
|
-
const program = termost("The zero-configuration bundler
|
|
339
|
+
const program = termost("The zero-configuration transpiler and bundler for the web");
|
|
341
340
|
for (const commandBuilder of commandBuilders){
|
|
342
341
|
commandBuilder(program);
|
|
343
342
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quickbundle",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.2",
|
|
4
4
|
"description": "The zero-configuration transpiler and bundler for the web",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Ayoub Adib",
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
"@rollup/plugin-json": "^6.1.0",
|
|
53
53
|
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
54
54
|
"@rollup/plugin-url": "^8.0.2",
|
|
55
|
+
"@swc/core": "^1.7.40",
|
|
55
56
|
"gzip-size": "^7.0.0",
|
|
56
57
|
"rollup": "^4.24.0",
|
|
57
58
|
"rollup-plugin-dts": "^6.1.1",
|