package-build-stats 8.2.0 → 8.2.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
CHANGED
package/bin/cli.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import autoprefixer from 'autoprefixer';
|
|
2
2
|
import escapeRegex from 'escape-string-regexp';
|
|
3
3
|
import rspack from '@rspack/core';
|
|
4
|
+
import { createRequire } from 'module';
|
|
5
|
+
const require = createRequire(import.meta.url);
|
|
4
6
|
export default function makeRspackConfig({ packageName: _packageName, entry, externals, debug: _debug, minify = true, }) {
|
|
5
7
|
const externalsRegex = makeExternalsRegex(externals.externalPackages);
|
|
6
8
|
const isExternalRequest = (request) => {
|
|
@@ -152,7 +152,7 @@ const InstallationUtils = {
|
|
|
152
152
|
if (networkConcurrency) {
|
|
153
153
|
flags.push(`network-concurrency=${networkConcurrency}`);
|
|
154
154
|
}
|
|
155
|
-
command = `bun add ${packageString} ${additionalPackages.join(' ')} --${flags.join(' --')}`;
|
|
155
|
+
command = `bun add ${packageString} ${additionalPackages.join(' ')} --cache-dir=${path.join(config.tmp, 'cache', 'bun')} --${flags.join(' --')}`;
|
|
156
156
|
}
|
|
157
157
|
else {
|
|
158
158
|
console.error('No valid client specified');
|
package/package.json
CHANGED
|
@@ -3,6 +3,9 @@ import autoprefixer from 'autoprefixer'
|
|
|
3
3
|
import escapeRegex from 'escape-string-regexp'
|
|
4
4
|
import type { Entry, Configuration } from '@rspack/core'
|
|
5
5
|
import rspack from '@rspack/core'
|
|
6
|
+
import { createRequire } from 'module'
|
|
7
|
+
|
|
8
|
+
const require = createRequire(import.meta.url)
|
|
6
9
|
|
|
7
10
|
import { Externals } from '../common.types.js'
|
|
8
11
|
|
|
@@ -239,7 +239,9 @@ const InstallationUtils = {
|
|
|
239
239
|
|
|
240
240
|
command = `bun add ${packageString} ${additionalPackages.join(
|
|
241
241
|
' ',
|
|
242
|
-
)}
|
|
242
|
+
)} --cache-dir=${path.join(config.tmp, 'cache', 'bun')} --${flags.join(
|
|
243
|
+
' --',
|
|
244
|
+
)}`
|
|
243
245
|
} else {
|
|
244
246
|
console.error('No valid client specified')
|
|
245
247
|
process.exit(1)
|