xshell 1.0.126 → 1.0.128
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/builder.d.ts +1 -0
- package/builder.js +6 -1
- package/package.json +1 -1
package/builder.d.ts
CHANGED
|
@@ -45,4 +45,5 @@ export declare class Bundler {
|
|
|
45
45
|
constructor(name: string, target: 'web' | 'nodejs', fpd_root: string, fpd_out: string, fpdt_cache: string, entry: Record<string, string>, { source_map, globals, externals, commonjs2, single_chunk, dynamic_import, assets_stats, analyzer, dts, exclude_modules, cache_version, production, sass, }?: BundlerOptions);
|
|
46
46
|
build(print?: boolean): Promise<void>;
|
|
47
47
|
close(): Promise<void>;
|
|
48
|
+
build_and_close(print?: boolean): Promise<void>;
|
|
48
49
|
}
|
package/builder.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { fileURLToPath } from 'url';
|
|
1
2
|
import Webpack from 'webpack';
|
|
2
3
|
import { Lock, Timer, filter_values } from './utils.js';
|
|
3
4
|
export class Bundler {
|
|
@@ -34,7 +35,7 @@ export class Bundler {
|
|
|
34
35
|
// const config: Webpack.Configuration = smp.wrap({
|
|
35
36
|
let resolve_cache = {};
|
|
36
37
|
function get_loader(name) {
|
|
37
|
-
return resolve_cache[name] ??= import.meta.resolve(name).fdir;
|
|
38
|
+
return resolve_cache[name] ??= fileURLToPath(import.meta.resolve(`${name}/package.json`)).fdir;
|
|
38
39
|
}
|
|
39
40
|
this.config = {
|
|
40
41
|
name,
|
|
@@ -294,5 +295,9 @@ export class Bundler {
|
|
|
294
295
|
});
|
|
295
296
|
}));
|
|
296
297
|
}
|
|
298
|
+
async build_and_close(print = true) {
|
|
299
|
+
await this.build(print);
|
|
300
|
+
await this.close();
|
|
301
|
+
}
|
|
297
302
|
}
|
|
298
303
|
//# sourceMappingURL=builder.js.map
|