@forsakringskassan/vite-lib-config 2.1.0 → 2.2.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.
- package/dist/cli.mjs +1 -8603
- package/dist/vite.config.cjs +141 -92
- package/dist/vite.config.mjs +144 -95
- package/package.json +1 -1
package/dist/vite.config.cjs
CHANGED
|
@@ -213,7 +213,7 @@ var require_dist = __commonJS({
|
|
|
213
213
|
var vite = require("vite");
|
|
214
214
|
var vue = require("vue");
|
|
215
215
|
var node_module = require("node:module");
|
|
216
|
-
var
|
|
216
|
+
var path4 = require("node:path");
|
|
217
217
|
var node_crypto = require("node:crypto");
|
|
218
218
|
var require$$0 = require("tty");
|
|
219
219
|
var require$$1 = require("util");
|
|
@@ -222,7 +222,7 @@ var require_dist = __commonJS({
|
|
|
222
222
|
return e && typeof e === "object" && "default" in e ? e.default : e;
|
|
223
223
|
}
|
|
224
224
|
var fs__default = /* @__PURE__ */ _interopDefaultCompat(fs4);
|
|
225
|
-
var path__default = /* @__PURE__ */ _interopDefaultCompat(
|
|
225
|
+
var path__default = /* @__PURE__ */ _interopDefaultCompat(path4);
|
|
226
226
|
var require$$0__default = /* @__PURE__ */ _interopDefaultCompat(require$$0);
|
|
227
227
|
var require$$1__default = /* @__PURE__ */ _interopDefaultCompat(require$$1);
|
|
228
228
|
var version2 = "4.6.2";
|
|
@@ -272,12 +272,12 @@ var require_dist = __commonJS({
|
|
|
272
272
|
query
|
|
273
273
|
};
|
|
274
274
|
}
|
|
275
|
-
function slash(
|
|
276
|
-
const isExtendedLengthPath =
|
|
275
|
+
function slash(path5) {
|
|
276
|
+
const isExtendedLengthPath = path5.startsWith("\\\\?\\");
|
|
277
277
|
if (isExtendedLengthPath) {
|
|
278
|
-
return
|
|
278
|
+
return path5;
|
|
279
279
|
}
|
|
280
|
-
return
|
|
280
|
+
return path5.replace(/\\/g, "/");
|
|
281
281
|
}
|
|
282
282
|
var cache = /* @__PURE__ */ new Map();
|
|
283
283
|
var hmrCache = /* @__PURE__ */ new Map();
|
|
@@ -771,16 +771,16 @@ import.meta.hot.accept(({ render }) => {
|
|
|
771
771
|
}
|
|
772
772
|
function parseFileUrl(input) {
|
|
773
773
|
const match2 = fileRegex.exec(input);
|
|
774
|
-
const
|
|
775
|
-
return makeUrl("file:", "", match2[1] || "", "", isAbsolutePath(
|
|
774
|
+
const path5 = match2[2];
|
|
775
|
+
return makeUrl("file:", "", match2[1] || "", "", isAbsolutePath(path5) ? path5 : "/" + path5, match2[3] || "", match2[4] || "");
|
|
776
776
|
}
|
|
777
|
-
function makeUrl(scheme, user, host, port,
|
|
777
|
+
function makeUrl(scheme, user, host, port, path5, query, hash) {
|
|
778
778
|
return {
|
|
779
779
|
scheme,
|
|
780
780
|
user,
|
|
781
781
|
host,
|
|
782
782
|
port,
|
|
783
|
-
path:
|
|
783
|
+
path: path5,
|
|
784
784
|
query,
|
|
785
785
|
hash,
|
|
786
786
|
type: UrlType.Absolute
|
|
@@ -810,11 +810,11 @@ import.meta.hot.accept(({ render }) => {
|
|
|
810
810
|
url.type = input ? input.startsWith("?") ? UrlType.Query : input.startsWith("#") ? UrlType.Hash : UrlType.RelativePath : UrlType.Empty;
|
|
811
811
|
return url;
|
|
812
812
|
}
|
|
813
|
-
function stripPathFilename(
|
|
814
|
-
if (
|
|
815
|
-
return
|
|
816
|
-
const index =
|
|
817
|
-
return
|
|
813
|
+
function stripPathFilename(path5) {
|
|
814
|
+
if (path5.endsWith("/.."))
|
|
815
|
+
return path5;
|
|
816
|
+
const index = path5.lastIndexOf("/");
|
|
817
|
+
return path5.slice(0, index + 1);
|
|
818
818
|
}
|
|
819
819
|
function mergePaths(url, base) {
|
|
820
820
|
normalizePath(base, base.type);
|
|
@@ -852,14 +852,14 @@ import.meta.hot.accept(({ render }) => {
|
|
|
852
852
|
pieces[pointer++] = piece;
|
|
853
853
|
positive++;
|
|
854
854
|
}
|
|
855
|
-
let
|
|
855
|
+
let path5 = "";
|
|
856
856
|
for (let i = 1; i < pointer; i++) {
|
|
857
|
-
|
|
857
|
+
path5 += "/" + pieces[i];
|
|
858
858
|
}
|
|
859
|
-
if (!
|
|
860
|
-
|
|
859
|
+
if (!path5 || addTrailingSlash && !path5.endsWith("/..")) {
|
|
860
|
+
path5 += "/";
|
|
861
861
|
}
|
|
862
|
-
url.path =
|
|
862
|
+
url.path = path5;
|
|
863
863
|
}
|
|
864
864
|
function resolve$1(input, base) {
|
|
865
865
|
if (!input && !base)
|
|
@@ -900,13 +900,13 @@ import.meta.hot.accept(({ render }) => {
|
|
|
900
900
|
case UrlType.Query:
|
|
901
901
|
return queryHash;
|
|
902
902
|
case UrlType.RelativePath: {
|
|
903
|
-
const
|
|
904
|
-
if (!
|
|
903
|
+
const path5 = url.path.slice(1);
|
|
904
|
+
if (!path5)
|
|
905
905
|
return queryHash || ".";
|
|
906
|
-
if (isRelative(base || input) && !isRelative(
|
|
907
|
-
return "./" +
|
|
906
|
+
if (isRelative(base || input) && !isRelative(path5)) {
|
|
907
|
+
return "./" + path5 + queryHash;
|
|
908
908
|
}
|
|
909
|
-
return
|
|
909
|
+
return path5 + queryHash;
|
|
910
910
|
}
|
|
911
911
|
case UrlType.AbsolutePath:
|
|
912
912
|
return url.path + queryHash;
|
|
@@ -919,11 +919,11 @@ import.meta.hot.accept(({ render }) => {
|
|
|
919
919
|
base += "/";
|
|
920
920
|
return resolve$1(input, base);
|
|
921
921
|
}
|
|
922
|
-
function stripFilename(
|
|
923
|
-
if (!
|
|
922
|
+
function stripFilename(path5) {
|
|
923
|
+
if (!path5)
|
|
924
924
|
return "";
|
|
925
|
-
const index =
|
|
926
|
-
return
|
|
925
|
+
const index = path5.lastIndexOf("/");
|
|
926
|
+
return path5.slice(0, index + 1);
|
|
927
927
|
}
|
|
928
928
|
var COLUMN$1 = 0;
|
|
929
929
|
function maybeSort(mappings, owned) {
|
|
@@ -2415,7 +2415,7 @@ import ${styleVar} from ${JSON.stringify(moduleRequest)}`,
|
|
|
2415
2415
|
cssDevSourcemap: false,
|
|
2416
2416
|
devToolsEnabled: process.env.NODE_ENV !== "production"
|
|
2417
2417
|
});
|
|
2418
|
-
const
|
|
2418
|
+
const filter3 = vue.computed(
|
|
2419
2419
|
() => vite.createFilter(options.value.include, options.value.exclude)
|
|
2420
2420
|
);
|
|
2421
2421
|
const customElementFilter = vue.computed(
|
|
@@ -2442,7 +2442,7 @@ import ${styleVar} from ${JSON.stringify(moduleRequest)}`,
|
|
|
2442
2442
|
if (typeDepToSFCMap.has(ctx.file)) {
|
|
2443
2443
|
return handleTypeDepChange(typeDepToSFCMap.get(ctx.file), ctx);
|
|
2444
2444
|
}
|
|
2445
|
-
if (
|
|
2445
|
+
if (filter3.value(ctx.file)) {
|
|
2446
2446
|
return handleHotUpdate(ctx, options.value);
|
|
2447
2447
|
}
|
|
2448
2448
|
},
|
|
@@ -2526,7 +2526,7 @@ import ${styleVar} from ${JSON.stringify(moduleRequest)}`,
|
|
|
2526
2526
|
if (query.raw || query.url) {
|
|
2527
2527
|
return;
|
|
2528
2528
|
}
|
|
2529
|
-
if (!
|
|
2529
|
+
if (!filter3.value(filename) && !query.vue) {
|
|
2530
2530
|
if (!query.vue && refTransformFilter.value(filename) && options.value.compiler.shouldTransformRef(code)) {
|
|
2531
2531
|
const result = options.value.compiler.transformRef(code, {
|
|
2532
2532
|
filename,
|
|
@@ -4653,6 +4653,60 @@ var import_deepmerge = __toESM(require_cjs());
|
|
|
4653
4653
|
var import_picocolors = __toESM(require_picocolors());
|
|
4654
4654
|
var import_plugin_vue3 = __toESM(require_plugin_vue3());
|
|
4655
4655
|
|
|
4656
|
+
// src/plugins/babel-plugin.ts
|
|
4657
|
+
var babel = __toESM(require("@babel/core"));
|
|
4658
|
+
var filter = /\.(js|ts|vue)$/;
|
|
4659
|
+
function babelPlugin() {
|
|
4660
|
+
return {
|
|
4661
|
+
name: "fk:babel",
|
|
4662
|
+
enforce: "post",
|
|
4663
|
+
async transform(src, id) {
|
|
4664
|
+
const { pathname: filename } = new URL(id, "file://");
|
|
4665
|
+
if (!filter.test(filename)) {
|
|
4666
|
+
return null;
|
|
4667
|
+
}
|
|
4668
|
+
const transformed = await babel.transformAsync(src, {
|
|
4669
|
+
sourceMaps: true,
|
|
4670
|
+
comments: true,
|
|
4671
|
+
filename
|
|
4672
|
+
});
|
|
4673
|
+
if (!transformed) {
|
|
4674
|
+
return null;
|
|
4675
|
+
}
|
|
4676
|
+
const { code, map } = transformed;
|
|
4677
|
+
return {
|
|
4678
|
+
code: code ?? src,
|
|
4679
|
+
map: map ?? null
|
|
4680
|
+
};
|
|
4681
|
+
}
|
|
4682
|
+
};
|
|
4683
|
+
}
|
|
4684
|
+
|
|
4685
|
+
// src/plugins/custom-mapping-plugin.ts
|
|
4686
|
+
var folder = {
|
|
4687
|
+
es: "esm",
|
|
4688
|
+
cjs: "cjs"
|
|
4689
|
+
};
|
|
4690
|
+
function customMappingPlugin() {
|
|
4691
|
+
return {
|
|
4692
|
+
name: "fk:custom-mapping",
|
|
4693
|
+
renderStart(options) {
|
|
4694
|
+
const { format } = options;
|
|
4695
|
+
if (format !== "es" && format !== "cjs") {
|
|
4696
|
+
return;
|
|
4697
|
+
}
|
|
4698
|
+
const replacement = folder[format];
|
|
4699
|
+
options.dir = options.dir?.replace("[custom-format]", replacement);
|
|
4700
|
+
if (typeof options.entryFileNames === "string") {
|
|
4701
|
+
options.entryFileNames = options.entryFileNames.replace(
|
|
4702
|
+
"[custom-format]",
|
|
4703
|
+
replacement
|
|
4704
|
+
);
|
|
4705
|
+
}
|
|
4706
|
+
}
|
|
4707
|
+
};
|
|
4708
|
+
}
|
|
4709
|
+
|
|
4656
4710
|
// src/plugins/index-html-plugin.ts
|
|
4657
4711
|
var import_promises = __toESM(require("node:fs/promises"));
|
|
4658
4712
|
var import_node_path = __toESM(require("node:path"));
|
|
@@ -4724,15 +4778,10 @@ function indexHtmlPlugin() {
|
|
|
4724
4778
|
}
|
|
4725
4779
|
|
|
4726
4780
|
// src/plugins/package-json-plugin.ts
|
|
4727
|
-
var import_posix = __toESM(require("node:path/posix"));
|
|
4728
4781
|
var mapping = {
|
|
4729
4782
|
es: "module",
|
|
4730
4783
|
cjs: "commonjs"
|
|
4731
4784
|
};
|
|
4732
|
-
var folder = {
|
|
4733
|
-
es: "esm",
|
|
4734
|
-
cjs: "cjs"
|
|
4735
|
-
};
|
|
4736
4785
|
function packageJsonPlugin() {
|
|
4737
4786
|
return {
|
|
4738
4787
|
name: "fk:package-json",
|
|
@@ -4746,7 +4795,7 @@ function packageJsonPlugin() {
|
|
|
4746
4795
|
};
|
|
4747
4796
|
this.emitFile({
|
|
4748
4797
|
type: "asset",
|
|
4749
|
-
fileName:
|
|
4798
|
+
fileName: "package.json",
|
|
4750
4799
|
source: JSON.stringify(pkg, null, 2)
|
|
4751
4800
|
});
|
|
4752
4801
|
}
|
|
@@ -5444,11 +5493,11 @@ var qmarksTestNoExtDot = ([$0]) => {
|
|
|
5444
5493
|
return (f) => f.length === len && f !== "." && f !== "..";
|
|
5445
5494
|
};
|
|
5446
5495
|
var defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
|
|
5447
|
-
var
|
|
5496
|
+
var path2 = {
|
|
5448
5497
|
win32: { sep: "\\" },
|
|
5449
5498
|
posix: { sep: "/" }
|
|
5450
5499
|
};
|
|
5451
|
-
var sep = defaultPlatform === "win32" ?
|
|
5500
|
+
var sep = defaultPlatform === "win32" ? path2.win32.sep : path2.posix.sep;
|
|
5452
5501
|
minimatch.sep = sep;
|
|
5453
5502
|
var GLOBSTAR = Symbol("globstar **");
|
|
5454
5503
|
minimatch.GLOBSTAR = GLOBSTAR;
|
|
@@ -5456,8 +5505,8 @@ var qmark2 = "[^/]";
|
|
|
5456
5505
|
var star2 = qmark2 + "*?";
|
|
5457
5506
|
var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";
|
|
5458
5507
|
var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?";
|
|
5459
|
-
var
|
|
5460
|
-
minimatch.filter =
|
|
5508
|
+
var filter2 = (pattern, options = {}) => (p) => minimatch(p, pattern, options);
|
|
5509
|
+
minimatch.filter = filter2;
|
|
5461
5510
|
var ext = (a, b = {}) => Object.assign({}, a, b);
|
|
5462
5511
|
var defaults = (def) => {
|
|
5463
5512
|
if (!def || typeof def !== "object" || !Object.keys(def).length) {
|
|
@@ -8530,12 +8579,12 @@ var PathBase = class {
|
|
|
8530
8579
|
/**
|
|
8531
8580
|
* Get the Path object referenced by the string path, resolved from this Path
|
|
8532
8581
|
*/
|
|
8533
|
-
resolve(
|
|
8534
|
-
if (!
|
|
8582
|
+
resolve(path4) {
|
|
8583
|
+
if (!path4) {
|
|
8535
8584
|
return this;
|
|
8536
8585
|
}
|
|
8537
|
-
const rootPath = this.getRootString(
|
|
8538
|
-
const dir =
|
|
8586
|
+
const rootPath = this.getRootString(path4);
|
|
8587
|
+
const dir = path4.substring(rootPath.length);
|
|
8539
8588
|
const dirParts = dir.split(this.splitSep);
|
|
8540
8589
|
const result = rootPath ? this.getRoot(rootPath).#resolveParts(dirParts) : this.#resolveParts(dirParts);
|
|
8541
8590
|
return result;
|
|
@@ -9287,8 +9336,8 @@ var PathWin32 = class _PathWin32 extends PathBase {
|
|
|
9287
9336
|
/**
|
|
9288
9337
|
* @internal
|
|
9289
9338
|
*/
|
|
9290
|
-
getRootString(
|
|
9291
|
-
return import_node_path2.win32.parse(
|
|
9339
|
+
getRootString(path4) {
|
|
9340
|
+
return import_node_path2.win32.parse(path4).root;
|
|
9292
9341
|
}
|
|
9293
9342
|
/**
|
|
9294
9343
|
* @internal
|
|
@@ -9334,8 +9383,8 @@ var PathPosix = class _PathPosix extends PathBase {
|
|
|
9334
9383
|
/**
|
|
9335
9384
|
* @internal
|
|
9336
9385
|
*/
|
|
9337
|
-
getRootString(
|
|
9338
|
-
return
|
|
9386
|
+
getRootString(path4) {
|
|
9387
|
+
return path4.startsWith("/") ? "/" : "";
|
|
9339
9388
|
}
|
|
9340
9389
|
/**
|
|
9341
9390
|
* @internal
|
|
@@ -9424,11 +9473,11 @@ var PathScurryBase = class {
|
|
|
9424
9473
|
/**
|
|
9425
9474
|
* Get the depth of a provided path, string, or the cwd
|
|
9426
9475
|
*/
|
|
9427
|
-
depth(
|
|
9428
|
-
if (typeof
|
|
9429
|
-
|
|
9476
|
+
depth(path4 = this.cwd) {
|
|
9477
|
+
if (typeof path4 === "string") {
|
|
9478
|
+
path4 = this.cwd.resolve(path4);
|
|
9430
9479
|
}
|
|
9431
|
-
return
|
|
9480
|
+
return path4.depth();
|
|
9432
9481
|
}
|
|
9433
9482
|
/**
|
|
9434
9483
|
* Return the cache of child entries. Exposed so subclasses can create
|
|
@@ -9654,9 +9703,9 @@ var PathScurryBase = class {
|
|
|
9654
9703
|
opts = entry;
|
|
9655
9704
|
entry = this.cwd;
|
|
9656
9705
|
}
|
|
9657
|
-
const { withFileTypes = true, follow = false, filter:
|
|
9706
|
+
const { withFileTypes = true, follow = false, filter: filter3, walkFilter } = opts;
|
|
9658
9707
|
const results = [];
|
|
9659
|
-
if (!
|
|
9708
|
+
if (!filter3 || filter3(entry)) {
|
|
9660
9709
|
results.push(withFileTypes ? entry : entry.fullpath());
|
|
9661
9710
|
}
|
|
9662
9711
|
const dirs = /* @__PURE__ */ new Set();
|
|
@@ -9675,7 +9724,7 @@ var PathScurryBase = class {
|
|
|
9675
9724
|
}
|
|
9676
9725
|
};
|
|
9677
9726
|
for (const e of entries) {
|
|
9678
|
-
if (!
|
|
9727
|
+
if (!filter3 || filter3(e)) {
|
|
9679
9728
|
results.push(withFileTypes ? e : e.fullpath());
|
|
9680
9729
|
}
|
|
9681
9730
|
if (follow && e.isSymbolicLink()) {
|
|
@@ -9706,16 +9755,16 @@ var PathScurryBase = class {
|
|
|
9706
9755
|
opts = entry;
|
|
9707
9756
|
entry = this.cwd;
|
|
9708
9757
|
}
|
|
9709
|
-
const { withFileTypes = true, follow = false, filter:
|
|
9758
|
+
const { withFileTypes = true, follow = false, filter: filter3, walkFilter } = opts;
|
|
9710
9759
|
const results = [];
|
|
9711
|
-
if (!
|
|
9760
|
+
if (!filter3 || filter3(entry)) {
|
|
9712
9761
|
results.push(withFileTypes ? entry : entry.fullpath());
|
|
9713
9762
|
}
|
|
9714
9763
|
const dirs = /* @__PURE__ */ new Set([entry]);
|
|
9715
9764
|
for (const dir of dirs) {
|
|
9716
9765
|
const entries = dir.readdirSync();
|
|
9717
9766
|
for (const e of entries) {
|
|
9718
|
-
if (!
|
|
9767
|
+
if (!filter3 || filter3(e)) {
|
|
9719
9768
|
results.push(withFileTypes ? e : e.fullpath());
|
|
9720
9769
|
}
|
|
9721
9770
|
let r = e;
|
|
@@ -9768,15 +9817,15 @@ var PathScurryBase = class {
|
|
|
9768
9817
|
opts = entry;
|
|
9769
9818
|
entry = this.cwd;
|
|
9770
9819
|
}
|
|
9771
|
-
const { withFileTypes = true, follow = false, filter:
|
|
9772
|
-
if (!
|
|
9820
|
+
const { withFileTypes = true, follow = false, filter: filter3, walkFilter } = opts;
|
|
9821
|
+
if (!filter3 || filter3(entry)) {
|
|
9773
9822
|
yield withFileTypes ? entry : entry.fullpath();
|
|
9774
9823
|
}
|
|
9775
9824
|
const dirs = /* @__PURE__ */ new Set([entry]);
|
|
9776
9825
|
for (const dir of dirs) {
|
|
9777
9826
|
const entries = dir.readdirSync();
|
|
9778
9827
|
for (const e of entries) {
|
|
9779
|
-
if (!
|
|
9828
|
+
if (!filter3 || filter3(e)) {
|
|
9780
9829
|
yield withFileTypes ? e : e.fullpath();
|
|
9781
9830
|
}
|
|
9782
9831
|
let r = e;
|
|
@@ -9799,9 +9848,9 @@ var PathScurryBase = class {
|
|
|
9799
9848
|
opts = entry;
|
|
9800
9849
|
entry = this.cwd;
|
|
9801
9850
|
}
|
|
9802
|
-
const { withFileTypes = true, follow = false, filter:
|
|
9851
|
+
const { withFileTypes = true, follow = false, filter: filter3, walkFilter } = opts;
|
|
9803
9852
|
const results = new Minipass({ objectMode: true });
|
|
9804
|
-
if (!
|
|
9853
|
+
if (!filter3 || filter3(entry)) {
|
|
9805
9854
|
results.write(withFileTypes ? entry : entry.fullpath());
|
|
9806
9855
|
}
|
|
9807
9856
|
const dirs = /* @__PURE__ */ new Set();
|
|
@@ -9834,7 +9883,7 @@ var PathScurryBase = class {
|
|
|
9834
9883
|
}
|
|
9835
9884
|
}
|
|
9836
9885
|
for (const e of entries) {
|
|
9837
|
-
if (e && (!
|
|
9886
|
+
if (e && (!filter3 || filter3(e))) {
|
|
9838
9887
|
if (!results.write(withFileTypes ? e : e.fullpath())) {
|
|
9839
9888
|
paused = true;
|
|
9840
9889
|
}
|
|
@@ -9868,10 +9917,10 @@ var PathScurryBase = class {
|
|
|
9868
9917
|
opts = entry;
|
|
9869
9918
|
entry = this.cwd;
|
|
9870
9919
|
}
|
|
9871
|
-
const { withFileTypes = true, follow = false, filter:
|
|
9920
|
+
const { withFileTypes = true, follow = false, filter: filter3, walkFilter } = opts;
|
|
9872
9921
|
const results = new Minipass({ objectMode: true });
|
|
9873
9922
|
const dirs = /* @__PURE__ */ new Set();
|
|
9874
|
-
if (!
|
|
9923
|
+
if (!filter3 || filter3(entry)) {
|
|
9875
9924
|
results.write(withFileTypes ? entry : entry.fullpath());
|
|
9876
9925
|
}
|
|
9877
9926
|
const queue = [entry];
|
|
@@ -9889,7 +9938,7 @@ var PathScurryBase = class {
|
|
|
9889
9938
|
dirs.add(dir);
|
|
9890
9939
|
const entries = dir.readdirSync();
|
|
9891
9940
|
for (const e of entries) {
|
|
9892
|
-
if (!
|
|
9941
|
+
if (!filter3 || filter3(e)) {
|
|
9893
9942
|
if (!results.write(withFileTypes ? e : e.fullpath())) {
|
|
9894
9943
|
paused = true;
|
|
9895
9944
|
}
|
|
@@ -9915,9 +9964,9 @@ var PathScurryBase = class {
|
|
|
9915
9964
|
process2();
|
|
9916
9965
|
return results;
|
|
9917
9966
|
}
|
|
9918
|
-
chdir(
|
|
9967
|
+
chdir(path4 = this.cwd) {
|
|
9919
9968
|
const oldCwd = this.cwd;
|
|
9920
|
-
this.cwd = typeof
|
|
9969
|
+
this.cwd = typeof path4 === "string" ? this.cwd.resolve(path4) : path4;
|
|
9921
9970
|
this.cwd[setAsCwd](oldCwd);
|
|
9922
9971
|
}
|
|
9923
9972
|
};
|
|
@@ -10273,8 +10322,8 @@ var MatchRecord = class {
|
|
|
10273
10322
|
}
|
|
10274
10323
|
// match, absolute, ifdir
|
|
10275
10324
|
entries() {
|
|
10276
|
-
return [...this.store.entries()].map(([
|
|
10277
|
-
|
|
10325
|
+
return [...this.store.entries()].map(([path4, n]) => [
|
|
10326
|
+
path4,
|
|
10278
10327
|
!!(n & 2),
|
|
10279
10328
|
!!(n & 1)
|
|
10280
10329
|
]);
|
|
@@ -10479,9 +10528,9 @@ var GlobUtil = class {
|
|
|
10479
10528
|
signal;
|
|
10480
10529
|
maxDepth;
|
|
10481
10530
|
includeChildMatches;
|
|
10482
|
-
constructor(patterns,
|
|
10531
|
+
constructor(patterns, path4, opts) {
|
|
10483
10532
|
this.patterns = patterns;
|
|
10484
|
-
this.path =
|
|
10533
|
+
this.path = path4;
|
|
10485
10534
|
this.opts = opts;
|
|
10486
10535
|
this.#sep = !opts.posix && opts.platform === "win32" ? "\\" : "/";
|
|
10487
10536
|
this.includeChildMatches = opts.includeChildMatches !== false;
|
|
@@ -10500,11 +10549,11 @@ var GlobUtil = class {
|
|
|
10500
10549
|
});
|
|
10501
10550
|
}
|
|
10502
10551
|
}
|
|
10503
|
-
#ignored(
|
|
10504
|
-
return this.seen.has(
|
|
10552
|
+
#ignored(path4) {
|
|
10553
|
+
return this.seen.has(path4) || !!this.#ignore?.ignored?.(path4);
|
|
10505
10554
|
}
|
|
10506
|
-
#childrenIgnored(
|
|
10507
|
-
return !!this.#ignore?.childrenIgnored?.(
|
|
10555
|
+
#childrenIgnored(path4) {
|
|
10556
|
+
return !!this.#ignore?.childrenIgnored?.(path4);
|
|
10508
10557
|
}
|
|
10509
10558
|
// backpressure mechanism
|
|
10510
10559
|
pause() {
|
|
@@ -10719,8 +10768,8 @@ var GlobUtil = class {
|
|
|
10719
10768
|
};
|
|
10720
10769
|
var GlobWalker = class extends GlobUtil {
|
|
10721
10770
|
matches = /* @__PURE__ */ new Set();
|
|
10722
|
-
constructor(patterns,
|
|
10723
|
-
super(patterns,
|
|
10771
|
+
constructor(patterns, path4, opts) {
|
|
10772
|
+
super(patterns, path4, opts);
|
|
10724
10773
|
}
|
|
10725
10774
|
matchEmit(e) {
|
|
10726
10775
|
this.matches.add(e);
|
|
@@ -10757,8 +10806,8 @@ var GlobWalker = class extends GlobUtil {
|
|
|
10757
10806
|
};
|
|
10758
10807
|
var GlobStream = class extends GlobUtil {
|
|
10759
10808
|
results;
|
|
10760
|
-
constructor(patterns,
|
|
10761
|
-
super(patterns,
|
|
10809
|
+
constructor(patterns, path4, opts) {
|
|
10810
|
+
super(patterns, path4, opts);
|
|
10762
10811
|
this.results = new Minipass({
|
|
10763
10812
|
signal: this.signal,
|
|
10764
10813
|
objectMode: true
|
|
@@ -11253,7 +11302,13 @@ var internalDependencies = detectInternalDependencies(
|
|
|
11253
11302
|
packages,
|
|
11254
11303
|
allDependencies
|
|
11255
11304
|
);
|
|
11256
|
-
var defaultPlugins = [
|
|
11305
|
+
var defaultPlugins = [
|
|
11306
|
+
indexHtmlPlugin(),
|
|
11307
|
+
packageJsonPlugin(),
|
|
11308
|
+
vuePlugin(),
|
|
11309
|
+
customMappingPlugin(),
|
|
11310
|
+
babelPlugin()
|
|
11311
|
+
];
|
|
11257
11312
|
var defaultConfig = {
|
|
11258
11313
|
fk: {},
|
|
11259
11314
|
plugins: defaultPlugins,
|
|
@@ -11269,22 +11324,16 @@ var defaultConfig = {
|
|
|
11269
11324
|
emptyOutDir: false,
|
|
11270
11325
|
minify: false,
|
|
11271
11326
|
sourcemap: true,
|
|
11272
|
-
outDir: "",
|
|
11327
|
+
outDir: "dist/[custom-format]",
|
|
11273
11328
|
lib: {
|
|
11274
11329
|
entry: "src/index.ts",
|
|
11275
11330
|
formats: ["es", "cjs"]
|
|
11276
11331
|
},
|
|
11277
11332
|
rollupOptions: {
|
|
11278
11333
|
output: {
|
|
11279
|
-
entryFileNames: `
|
|
11334
|
+
entryFileNames: `index.[custom-format].js`,
|
|
11280
11335
|
globals: {
|
|
11281
11336
|
vue: "Vue"
|
|
11282
|
-
},
|
|
11283
|
-
assetFileNames(assetInfo) {
|
|
11284
|
-
if (assetInfo.name === "style.css") {
|
|
11285
|
-
return "dist/style.css";
|
|
11286
|
-
}
|
|
11287
|
-
return assetInfo.name ?? "";
|
|
11288
11337
|
}
|
|
11289
11338
|
},
|
|
11290
11339
|
external: Array.from(external)
|