@forsakringskassan/vite-lib-config 2.0.3 → 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.
@@ -135,17 +135,16 @@ var require_cjs = __commonJS({
135
135
  // node_modules/picocolors/picocolors.js
136
136
  var require_picocolors = __commonJS({
137
137
  "node_modules/picocolors/picocolors.js"(exports2, module2) {
138
- var argv = process.argv || [];
139
- var env = process.env;
140
- var isColorSupported = !("NO_COLOR" in env || argv.includes("--no-color")) && ("FORCE_COLOR" in env || argv.includes("--color") || process.platform === "win32" || require != null && require("tty").isatty(1) && env.TERM !== "dumb" || "CI" in env);
138
+ var p = process || {};
139
+ var argv = p.argv || [];
140
+ var env = p.env || {};
141
+ var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
141
142
  var formatter = (open, close, replace = open) => (input) => {
142
- let string = "" + input;
143
- let index = string.indexOf(close, open.length);
143
+ let string = "" + input, index = string.indexOf(close, open.length);
144
144
  return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
145
145
  };
146
146
  var replaceClose = (string, close, replace, index) => {
147
- let result = "";
148
- let cursor = 0;
147
+ let result = "", cursor = 0;
149
148
  do {
150
149
  result += string.substring(cursor, index) + replace;
151
150
  cursor = index + close.length;
@@ -154,50 +153,50 @@ var require_picocolors = __commonJS({
154
153
  return result + string.substring(cursor);
155
154
  };
156
155
  var createColors = (enabled = isColorSupported) => {
157
- let init = enabled ? formatter : () => String;
156
+ let f = enabled ? formatter : () => String;
158
157
  return {
159
158
  isColorSupported: enabled,
160
- reset: init("\x1B[0m", "\x1B[0m"),
161
- bold: init("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
162
- dim: init("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
163
- italic: init("\x1B[3m", "\x1B[23m"),
164
- underline: init("\x1B[4m", "\x1B[24m"),
165
- inverse: init("\x1B[7m", "\x1B[27m"),
166
- hidden: init("\x1B[8m", "\x1B[28m"),
167
- strikethrough: init("\x1B[9m", "\x1B[29m"),
168
- black: init("\x1B[30m", "\x1B[39m"),
169
- red: init("\x1B[31m", "\x1B[39m"),
170
- green: init("\x1B[32m", "\x1B[39m"),
171
- yellow: init("\x1B[33m", "\x1B[39m"),
172
- blue: init("\x1B[34m", "\x1B[39m"),
173
- magenta: init("\x1B[35m", "\x1B[39m"),
174
- cyan: init("\x1B[36m", "\x1B[39m"),
175
- white: init("\x1B[37m", "\x1B[39m"),
176
- gray: init("\x1B[90m", "\x1B[39m"),
177
- bgBlack: init("\x1B[40m", "\x1B[49m"),
178
- bgRed: init("\x1B[41m", "\x1B[49m"),
179
- bgGreen: init("\x1B[42m", "\x1B[49m"),
180
- bgYellow: init("\x1B[43m", "\x1B[49m"),
181
- bgBlue: init("\x1B[44m", "\x1B[49m"),
182
- bgMagenta: init("\x1B[45m", "\x1B[49m"),
183
- bgCyan: init("\x1B[46m", "\x1B[49m"),
184
- bgWhite: init("\x1B[47m", "\x1B[49m"),
185
- blackBright: init("\x1B[90m", "\x1B[39m"),
186
- redBright: init("\x1B[91m", "\x1B[39m"),
187
- greenBright: init("\x1B[92m", "\x1B[39m"),
188
- yellowBright: init("\x1B[93m", "\x1B[39m"),
189
- blueBright: init("\x1B[94m", "\x1B[39m"),
190
- magentaBright: init("\x1B[95m", "\x1B[39m"),
191
- cyanBright: init("\x1B[96m", "\x1B[39m"),
192
- whiteBright: init("\x1B[97m", "\x1B[39m"),
193
- bgBlackBright: init("\x1B[100m", "\x1B[49m"),
194
- bgRedBright: init("\x1B[101m", "\x1B[49m"),
195
- bgGreenBright: init("\x1B[102m", "\x1B[49m"),
196
- bgYellowBright: init("\x1B[103m", "\x1B[49m"),
197
- bgBlueBright: init("\x1B[104m", "\x1B[49m"),
198
- bgMagentaBright: init("\x1B[105m", "\x1B[49m"),
199
- bgCyanBright: init("\x1B[106m", "\x1B[49m"),
200
- bgWhiteBright: init("\x1B[107m", "\x1B[49m")
159
+ reset: f("\x1B[0m", "\x1B[0m"),
160
+ bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
161
+ dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
162
+ italic: f("\x1B[3m", "\x1B[23m"),
163
+ underline: f("\x1B[4m", "\x1B[24m"),
164
+ inverse: f("\x1B[7m", "\x1B[27m"),
165
+ hidden: f("\x1B[8m", "\x1B[28m"),
166
+ strikethrough: f("\x1B[9m", "\x1B[29m"),
167
+ black: f("\x1B[30m", "\x1B[39m"),
168
+ red: f("\x1B[31m", "\x1B[39m"),
169
+ green: f("\x1B[32m", "\x1B[39m"),
170
+ yellow: f("\x1B[33m", "\x1B[39m"),
171
+ blue: f("\x1B[34m", "\x1B[39m"),
172
+ magenta: f("\x1B[35m", "\x1B[39m"),
173
+ cyan: f("\x1B[36m", "\x1B[39m"),
174
+ white: f("\x1B[37m", "\x1B[39m"),
175
+ gray: f("\x1B[90m", "\x1B[39m"),
176
+ bgBlack: f("\x1B[40m", "\x1B[49m"),
177
+ bgRed: f("\x1B[41m", "\x1B[49m"),
178
+ bgGreen: f("\x1B[42m", "\x1B[49m"),
179
+ bgYellow: f("\x1B[43m", "\x1B[49m"),
180
+ bgBlue: f("\x1B[44m", "\x1B[49m"),
181
+ bgMagenta: f("\x1B[45m", "\x1B[49m"),
182
+ bgCyan: f("\x1B[46m", "\x1B[49m"),
183
+ bgWhite: f("\x1B[47m", "\x1B[49m"),
184
+ blackBright: f("\x1B[90m", "\x1B[39m"),
185
+ redBright: f("\x1B[91m", "\x1B[39m"),
186
+ greenBright: f("\x1B[92m", "\x1B[39m"),
187
+ yellowBright: f("\x1B[93m", "\x1B[39m"),
188
+ blueBright: f("\x1B[94m", "\x1B[39m"),
189
+ magentaBright: f("\x1B[95m", "\x1B[39m"),
190
+ cyanBright: f("\x1B[96m", "\x1B[39m"),
191
+ whiteBright: f("\x1B[97m", "\x1B[39m"),
192
+ bgBlackBright: f("\x1B[100m", "\x1B[49m"),
193
+ bgRedBright: f("\x1B[101m", "\x1B[49m"),
194
+ bgGreenBright: f("\x1B[102m", "\x1B[49m"),
195
+ bgYellowBright: f("\x1B[103m", "\x1B[49m"),
196
+ bgBlueBright: f("\x1B[104m", "\x1B[49m"),
197
+ bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
198
+ bgCyanBright: f("\x1B[106m", "\x1B[49m"),
199
+ bgWhiteBright: f("\x1B[107m", "\x1B[49m")
201
200
  };
202
201
  };
203
202
  module2.exports = createColors();
@@ -205,115 +204,6 @@ var require_picocolors = __commonJS({
205
204
  }
206
205
  });
207
206
 
208
- // node_modules/has-flag/index.js
209
- var require_has_flag = __commonJS({
210
- "node_modules/has-flag/index.js"(exports2, module2) {
211
- "use strict";
212
- module2.exports = (flag, argv) => {
213
- argv = argv || process.argv;
214
- const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
215
- const pos = argv.indexOf(prefix + flag);
216
- const terminatorPos = argv.indexOf("--");
217
- return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
218
- };
219
- }
220
- });
221
-
222
- // node_modules/supports-color/index.js
223
- var require_supports_color = __commonJS({
224
- "node_modules/supports-color/index.js"(exports2, module2) {
225
- "use strict";
226
- var os = require("os");
227
- var hasFlag = require_has_flag();
228
- var env = process.env;
229
- var forceColor;
230
- if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) {
231
- forceColor = false;
232
- } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
233
- forceColor = true;
234
- }
235
- if ("FORCE_COLOR" in env) {
236
- forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
237
- }
238
- function translateLevel(level) {
239
- if (level === 0) {
240
- return false;
241
- }
242
- return {
243
- level,
244
- hasBasic: true,
245
- has256: level >= 2,
246
- has16m: level >= 3
247
- };
248
- }
249
- function supportsColor(stream2) {
250
- if (forceColor === false) {
251
- return 0;
252
- }
253
- if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
254
- return 3;
255
- }
256
- if (hasFlag("color=256")) {
257
- return 2;
258
- }
259
- if (stream2 && !stream2.isTTY && forceColor !== true) {
260
- return 0;
261
- }
262
- const min = forceColor ? 1 : 0;
263
- if (process.platform === "win32") {
264
- const osRelease = os.release().split(".");
265
- if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
266
- return Number(osRelease[2]) >= 14931 ? 3 : 2;
267
- }
268
- return 1;
269
- }
270
- if ("CI" in env) {
271
- if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
272
- return 1;
273
- }
274
- return min;
275
- }
276
- if ("TEAMCITY_VERSION" in env) {
277
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
278
- }
279
- if (env.COLORTERM === "truecolor") {
280
- return 3;
281
- }
282
- if ("TERM_PROGRAM" in env) {
283
- const version2 = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
284
- switch (env.TERM_PROGRAM) {
285
- case "iTerm.app":
286
- return version2 >= 3 ? 3 : 2;
287
- case "Apple_Terminal":
288
- return 2;
289
- }
290
- }
291
- if (/-256(color)?$/i.test(env.TERM)) {
292
- return 2;
293
- }
294
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
295
- return 1;
296
- }
297
- if ("COLORTERM" in env) {
298
- return 1;
299
- }
300
- if (env.TERM === "dumb") {
301
- return min;
302
- }
303
- return min;
304
- }
305
- function getSupportLevel(stream2) {
306
- const level = supportsColor(stream2);
307
- return translateLevel(level);
308
- }
309
- module2.exports = {
310
- supportsColor: getSupportLevel,
311
- stdout: getSupportLevel(process.stdout),
312
- stderr: getSupportLevel(process.stderr)
313
- };
314
- }
315
- });
316
-
317
207
  // internal/plugin-vue3/node_modules/@vitejs/plugin-vue/dist/index.cjs
318
208
  var require_dist = __commonJS({
319
209
  "internal/plugin-vue3/node_modules/@vitejs/plugin-vue/dist/index.cjs"(exports2, module2) {
@@ -323,7 +213,7 @@ var require_dist = __commonJS({
323
213
  var vite = require("vite");
324
214
  var vue = require("vue");
325
215
  var node_module = require("node:module");
326
- var path5 = require("node:path");
216
+ var path4 = require("node:path");
327
217
  var node_crypto = require("node:crypto");
328
218
  var require$$0 = require("tty");
329
219
  var require$$1 = require("util");
@@ -332,7 +222,7 @@ var require_dist = __commonJS({
332
222
  return e && typeof e === "object" && "default" in e ? e.default : e;
333
223
  }
334
224
  var fs__default = /* @__PURE__ */ _interopDefaultCompat(fs4);
335
- var path__default = /* @__PURE__ */ _interopDefaultCompat(path5);
225
+ var path__default = /* @__PURE__ */ _interopDefaultCompat(path4);
336
226
  var require$$0__default = /* @__PURE__ */ _interopDefaultCompat(require$$0);
337
227
  var require$$1__default = /* @__PURE__ */ _interopDefaultCompat(require$$1);
338
228
  var version2 = "4.6.2";
@@ -382,12 +272,12 @@ var require_dist = __commonJS({
382
272
  query
383
273
  };
384
274
  }
385
- function slash(path6) {
386
- const isExtendedLengthPath = path6.startsWith("\\\\?\\");
275
+ function slash(path5) {
276
+ const isExtendedLengthPath = path5.startsWith("\\\\?\\");
387
277
  if (isExtendedLengthPath) {
388
- return path6;
278
+ return path5;
389
279
  }
390
- return path6.replace(/\\/g, "/");
280
+ return path5.replace(/\\/g, "/");
391
281
  }
392
282
  var cache = /* @__PURE__ */ new Map();
393
283
  var hmrCache = /* @__PURE__ */ new Map();
@@ -881,16 +771,16 @@ import.meta.hot.accept(({ render }) => {
881
771
  }
882
772
  function parseFileUrl(input) {
883
773
  const match2 = fileRegex.exec(input);
884
- const path6 = match2[2];
885
- return makeUrl("file:", "", match2[1] || "", "", isAbsolutePath(path6) ? path6 : "/" + path6, match2[3] || "", match2[4] || "");
774
+ const path5 = match2[2];
775
+ return makeUrl("file:", "", match2[1] || "", "", isAbsolutePath(path5) ? path5 : "/" + path5, match2[3] || "", match2[4] || "");
886
776
  }
887
- function makeUrl(scheme, user, host, port, path6, query, hash) {
777
+ function makeUrl(scheme, user, host, port, path5, query, hash) {
888
778
  return {
889
779
  scheme,
890
780
  user,
891
781
  host,
892
782
  port,
893
- path: path6,
783
+ path: path5,
894
784
  query,
895
785
  hash,
896
786
  type: UrlType.Absolute
@@ -920,11 +810,11 @@ import.meta.hot.accept(({ render }) => {
920
810
  url.type = input ? input.startsWith("?") ? UrlType.Query : input.startsWith("#") ? UrlType.Hash : UrlType.RelativePath : UrlType.Empty;
921
811
  return url;
922
812
  }
923
- function stripPathFilename(path6) {
924
- if (path6.endsWith("/.."))
925
- return path6;
926
- const index = path6.lastIndexOf("/");
927
- return path6.slice(0, index + 1);
813
+ function stripPathFilename(path5) {
814
+ if (path5.endsWith("/.."))
815
+ return path5;
816
+ const index = path5.lastIndexOf("/");
817
+ return path5.slice(0, index + 1);
928
818
  }
929
819
  function mergePaths(url, base) {
930
820
  normalizePath(base, base.type);
@@ -962,14 +852,14 @@ import.meta.hot.accept(({ render }) => {
962
852
  pieces[pointer++] = piece;
963
853
  positive++;
964
854
  }
965
- let path6 = "";
855
+ let path5 = "";
966
856
  for (let i = 1; i < pointer; i++) {
967
- path6 += "/" + pieces[i];
857
+ path5 += "/" + pieces[i];
968
858
  }
969
- if (!path6 || addTrailingSlash && !path6.endsWith("/..")) {
970
- path6 += "/";
859
+ if (!path5 || addTrailingSlash && !path5.endsWith("/..")) {
860
+ path5 += "/";
971
861
  }
972
- url.path = path6;
862
+ url.path = path5;
973
863
  }
974
864
  function resolve$1(input, base) {
975
865
  if (!input && !base)
@@ -1010,13 +900,13 @@ import.meta.hot.accept(({ render }) => {
1010
900
  case UrlType.Query:
1011
901
  return queryHash;
1012
902
  case UrlType.RelativePath: {
1013
- const path6 = url.path.slice(1);
1014
- if (!path6)
903
+ const path5 = url.path.slice(1);
904
+ if (!path5)
1015
905
  return queryHash || ".";
1016
- if (isRelative(base || input) && !isRelative(path6)) {
1017
- return "./" + path6 + queryHash;
906
+ if (isRelative(base || input) && !isRelative(path5)) {
907
+ return "./" + path5 + queryHash;
1018
908
  }
1019
- return path6 + queryHash;
909
+ return path5 + queryHash;
1020
910
  }
1021
911
  case UrlType.AbsolutePath:
1022
912
  return url.path + queryHash;
@@ -1029,11 +919,11 @@ import.meta.hot.accept(({ render }) => {
1029
919
  base += "/";
1030
920
  return resolve$1(input, base);
1031
921
  }
1032
- function stripFilename(path6) {
1033
- if (!path6)
922
+ function stripFilename(path5) {
923
+ if (!path5)
1034
924
  return "";
1035
- const index = path6.lastIndexOf("/");
1036
- return path6.slice(0, index + 1);
925
+ const index = path5.lastIndexOf("/");
926
+ return path5.slice(0, index + 1);
1037
927
  }
1038
928
  var COLUMN$1 = 0;
1039
929
  function maybeSort(mappings, owned) {
@@ -1766,7 +1656,7 @@ import.meta.hot.accept(({ render }) => {
1766
1656
  );
1767
1657
  exports3.colors = [6, 2, 3, 4, 5, 1];
1768
1658
  try {
1769
- const supportsColor = require_supports_color();
1659
+ const supportsColor = require("supports-color");
1770
1660
  if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
1771
1661
  exports3.colors = [
1772
1662
  20,
@@ -2525,7 +2415,7 @@ import ${styleVar} from ${JSON.stringify(moduleRequest)}`,
2525
2415
  cssDevSourcemap: false,
2526
2416
  devToolsEnabled: process.env.NODE_ENV !== "production"
2527
2417
  });
2528
- const filter2 = vue.computed(
2418
+ const filter3 = vue.computed(
2529
2419
  () => vite.createFilter(options.value.include, options.value.exclude)
2530
2420
  );
2531
2421
  const customElementFilter = vue.computed(
@@ -2552,7 +2442,7 @@ import ${styleVar} from ${JSON.stringify(moduleRequest)}`,
2552
2442
  if (typeDepToSFCMap.has(ctx.file)) {
2553
2443
  return handleTypeDepChange(typeDepToSFCMap.get(ctx.file), ctx);
2554
2444
  }
2555
- if (filter2.value(ctx.file)) {
2445
+ if (filter3.value(ctx.file)) {
2556
2446
  return handleHotUpdate(ctx, options.value);
2557
2447
  }
2558
2448
  },
@@ -2636,7 +2526,7 @@ import ${styleVar} from ${JSON.stringify(moduleRequest)}`,
2636
2526
  if (query.raw || query.url) {
2637
2527
  return;
2638
2528
  }
2639
- if (!filter2.value(filename) && !query.vue) {
2529
+ if (!filter3.value(filename) && !query.vue) {
2640
2530
  if (!query.vue && refTransformFilter.value(filename) && options.value.compiler.shouldTransformRef(code)) {
2641
2531
  const result = options.value.compiler.transformRef(code, {
2642
2532
  filename,
@@ -4763,6 +4653,60 @@ var import_deepmerge = __toESM(require_cjs());
4763
4653
  var import_picocolors = __toESM(require_picocolors());
4764
4654
  var import_plugin_vue3 = __toESM(require_plugin_vue3());
4765
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
+
4766
4710
  // src/plugins/index-html-plugin.ts
4767
4711
  var import_promises = __toESM(require("node:fs/promises"));
4768
4712
  var import_node_path = __toESM(require("node:path"));
@@ -4834,15 +4778,10 @@ function indexHtmlPlugin() {
4834
4778
  }
4835
4779
 
4836
4780
  // src/plugins/package-json-plugin.ts
4837
- var import_posix = __toESM(require("node:path/posix"));
4838
4781
  var mapping = {
4839
4782
  es: "module",
4840
4783
  cjs: "commonjs"
4841
4784
  };
4842
- var folder = {
4843
- es: "esm",
4844
- cjs: "cjs"
4845
- };
4846
4785
  function packageJsonPlugin() {
4847
4786
  return {
4848
4787
  name: "fk:package-json",
@@ -4856,7 +4795,7 @@ function packageJsonPlugin() {
4856
4795
  };
4857
4796
  this.emitFile({
4858
4797
  type: "asset",
4859
- fileName: import_posix.default.join("dist", folder[format], "package.json"),
4798
+ fileName: "package.json",
4860
4799
  source: JSON.stringify(pkg, null, 2)
4861
4800
  });
4862
4801
  }
@@ -4864,27 +4803,19 @@ function packageJsonPlugin() {
4864
4803
  }
4865
4804
 
4866
4805
  // src/utils/detect-internal-dependencies.ts
4867
- var exclude = ["/css-variables", "/design"];
4868
- function isExcluded(name) {
4869
- return exclude.some((suffix) => name.endsWith(suffix));
4870
- }
4871
4806
  function detectInternalDependencies(packages2, dependencies2) {
4872
4807
  const internal = packages2.filter((pkg) => dependencies2.includes(pkg.name));
4873
- const included = internal.filter((pkg) => !isExcluded(pkg.name));
4874
4808
  const num = internal.length;
4875
- const skipped = internal.length - included.length;
4876
4809
  console.group("Detecting monorepo dependencies:");
4877
4810
  if (num > 0) {
4878
4811
  const ies = num === 1 ? "y" : "ies";
4879
- console.log(
4880
- `${num} internal dependenc${ies} found (${skipped} skipped).
4881
- `
4882
- );
4812
+ console.log(`${num} internal dependenc${ies} found.
4813
+ `);
4883
4814
  } else {
4884
4815
  console.log("No internal dependencies found");
4885
4816
  }
4886
4817
  console.groupEnd();
4887
- return included;
4818
+ return internal;
4888
4819
  }
4889
4820
 
4890
4821
  // src/utils/detect-monorepo-packages.ts
@@ -5562,11 +5493,11 @@ var qmarksTestNoExtDot = ([$0]) => {
5562
5493
  return (f) => f.length === len && f !== "." && f !== "..";
5563
5494
  };
5564
5495
  var defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
5565
- var path3 = {
5496
+ var path2 = {
5566
5497
  win32: { sep: "\\" },
5567
5498
  posix: { sep: "/" }
5568
5499
  };
5569
- var sep = defaultPlatform === "win32" ? path3.win32.sep : path3.posix.sep;
5500
+ var sep = defaultPlatform === "win32" ? path2.win32.sep : path2.posix.sep;
5570
5501
  minimatch.sep = sep;
5571
5502
  var GLOBSTAR = Symbol("globstar **");
5572
5503
  minimatch.GLOBSTAR = GLOBSTAR;
@@ -5574,8 +5505,8 @@ var qmark2 = "[^/]";
5574
5505
  var star2 = qmark2 + "*?";
5575
5506
  var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";
5576
5507
  var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?";
5577
- var filter = (pattern, options = {}) => (p) => minimatch(p, pattern, options);
5578
- minimatch.filter = filter;
5508
+ var filter2 = (pattern, options = {}) => (p) => minimatch(p, pattern, options);
5509
+ minimatch.filter = filter2;
5579
5510
  var ext = (a, b = {}) => Object.assign({}, a, b);
5580
5511
  var defaults = (def) => {
5581
5512
  if (!def || typeof def !== "object" || !Object.keys(def).length) {
@@ -8648,12 +8579,12 @@ var PathBase = class {
8648
8579
  /**
8649
8580
  * Get the Path object referenced by the string path, resolved from this Path
8650
8581
  */
8651
- resolve(path5) {
8652
- if (!path5) {
8582
+ resolve(path4) {
8583
+ if (!path4) {
8653
8584
  return this;
8654
8585
  }
8655
- const rootPath = this.getRootString(path5);
8656
- const dir = path5.substring(rootPath.length);
8586
+ const rootPath = this.getRootString(path4);
8587
+ const dir = path4.substring(rootPath.length);
8657
8588
  const dirParts = dir.split(this.splitSep);
8658
8589
  const result = rootPath ? this.getRoot(rootPath).#resolveParts(dirParts) : this.#resolveParts(dirParts);
8659
8590
  return result;
@@ -9405,8 +9336,8 @@ var PathWin32 = class _PathWin32 extends PathBase {
9405
9336
  /**
9406
9337
  * @internal
9407
9338
  */
9408
- getRootString(path5) {
9409
- return import_node_path2.win32.parse(path5).root;
9339
+ getRootString(path4) {
9340
+ return import_node_path2.win32.parse(path4).root;
9410
9341
  }
9411
9342
  /**
9412
9343
  * @internal
@@ -9452,8 +9383,8 @@ var PathPosix = class _PathPosix extends PathBase {
9452
9383
  /**
9453
9384
  * @internal
9454
9385
  */
9455
- getRootString(path5) {
9456
- return path5.startsWith("/") ? "/" : "";
9386
+ getRootString(path4) {
9387
+ return path4.startsWith("/") ? "/" : "";
9457
9388
  }
9458
9389
  /**
9459
9390
  * @internal
@@ -9542,11 +9473,11 @@ var PathScurryBase = class {
9542
9473
  /**
9543
9474
  * Get the depth of a provided path, string, or the cwd
9544
9475
  */
9545
- depth(path5 = this.cwd) {
9546
- if (typeof path5 === "string") {
9547
- path5 = this.cwd.resolve(path5);
9476
+ depth(path4 = this.cwd) {
9477
+ if (typeof path4 === "string") {
9478
+ path4 = this.cwd.resolve(path4);
9548
9479
  }
9549
- return path5.depth();
9480
+ return path4.depth();
9550
9481
  }
9551
9482
  /**
9552
9483
  * Return the cache of child entries. Exposed so subclasses can create
@@ -9772,9 +9703,9 @@ var PathScurryBase = class {
9772
9703
  opts = entry;
9773
9704
  entry = this.cwd;
9774
9705
  }
9775
- const { withFileTypes = true, follow = false, filter: filter2, walkFilter } = opts;
9706
+ const { withFileTypes = true, follow = false, filter: filter3, walkFilter } = opts;
9776
9707
  const results = [];
9777
- if (!filter2 || filter2(entry)) {
9708
+ if (!filter3 || filter3(entry)) {
9778
9709
  results.push(withFileTypes ? entry : entry.fullpath());
9779
9710
  }
9780
9711
  const dirs = /* @__PURE__ */ new Set();
@@ -9793,7 +9724,7 @@ var PathScurryBase = class {
9793
9724
  }
9794
9725
  };
9795
9726
  for (const e of entries) {
9796
- if (!filter2 || filter2(e)) {
9727
+ if (!filter3 || filter3(e)) {
9797
9728
  results.push(withFileTypes ? e : e.fullpath());
9798
9729
  }
9799
9730
  if (follow && e.isSymbolicLink()) {
@@ -9824,16 +9755,16 @@ var PathScurryBase = class {
9824
9755
  opts = entry;
9825
9756
  entry = this.cwd;
9826
9757
  }
9827
- const { withFileTypes = true, follow = false, filter: filter2, walkFilter } = opts;
9758
+ const { withFileTypes = true, follow = false, filter: filter3, walkFilter } = opts;
9828
9759
  const results = [];
9829
- if (!filter2 || filter2(entry)) {
9760
+ if (!filter3 || filter3(entry)) {
9830
9761
  results.push(withFileTypes ? entry : entry.fullpath());
9831
9762
  }
9832
9763
  const dirs = /* @__PURE__ */ new Set([entry]);
9833
9764
  for (const dir of dirs) {
9834
9765
  const entries = dir.readdirSync();
9835
9766
  for (const e of entries) {
9836
- if (!filter2 || filter2(e)) {
9767
+ if (!filter3 || filter3(e)) {
9837
9768
  results.push(withFileTypes ? e : e.fullpath());
9838
9769
  }
9839
9770
  let r = e;
@@ -9886,15 +9817,15 @@ var PathScurryBase = class {
9886
9817
  opts = entry;
9887
9818
  entry = this.cwd;
9888
9819
  }
9889
- const { withFileTypes = true, follow = false, filter: filter2, walkFilter } = opts;
9890
- if (!filter2 || filter2(entry)) {
9820
+ const { withFileTypes = true, follow = false, filter: filter3, walkFilter } = opts;
9821
+ if (!filter3 || filter3(entry)) {
9891
9822
  yield withFileTypes ? entry : entry.fullpath();
9892
9823
  }
9893
9824
  const dirs = /* @__PURE__ */ new Set([entry]);
9894
9825
  for (const dir of dirs) {
9895
9826
  const entries = dir.readdirSync();
9896
9827
  for (const e of entries) {
9897
- if (!filter2 || filter2(e)) {
9828
+ if (!filter3 || filter3(e)) {
9898
9829
  yield withFileTypes ? e : e.fullpath();
9899
9830
  }
9900
9831
  let r = e;
@@ -9917,9 +9848,9 @@ var PathScurryBase = class {
9917
9848
  opts = entry;
9918
9849
  entry = this.cwd;
9919
9850
  }
9920
- const { withFileTypes = true, follow = false, filter: filter2, walkFilter } = opts;
9851
+ const { withFileTypes = true, follow = false, filter: filter3, walkFilter } = opts;
9921
9852
  const results = new Minipass({ objectMode: true });
9922
- if (!filter2 || filter2(entry)) {
9853
+ if (!filter3 || filter3(entry)) {
9923
9854
  results.write(withFileTypes ? entry : entry.fullpath());
9924
9855
  }
9925
9856
  const dirs = /* @__PURE__ */ new Set();
@@ -9952,7 +9883,7 @@ var PathScurryBase = class {
9952
9883
  }
9953
9884
  }
9954
9885
  for (const e of entries) {
9955
- if (e && (!filter2 || filter2(e))) {
9886
+ if (e && (!filter3 || filter3(e))) {
9956
9887
  if (!results.write(withFileTypes ? e : e.fullpath())) {
9957
9888
  paused = true;
9958
9889
  }
@@ -9986,10 +9917,10 @@ var PathScurryBase = class {
9986
9917
  opts = entry;
9987
9918
  entry = this.cwd;
9988
9919
  }
9989
- const { withFileTypes = true, follow = false, filter: filter2, walkFilter } = opts;
9920
+ const { withFileTypes = true, follow = false, filter: filter3, walkFilter } = opts;
9990
9921
  const results = new Minipass({ objectMode: true });
9991
9922
  const dirs = /* @__PURE__ */ new Set();
9992
- if (!filter2 || filter2(entry)) {
9923
+ if (!filter3 || filter3(entry)) {
9993
9924
  results.write(withFileTypes ? entry : entry.fullpath());
9994
9925
  }
9995
9926
  const queue = [entry];
@@ -10007,7 +9938,7 @@ var PathScurryBase = class {
10007
9938
  dirs.add(dir);
10008
9939
  const entries = dir.readdirSync();
10009
9940
  for (const e of entries) {
10010
- if (!filter2 || filter2(e)) {
9941
+ if (!filter3 || filter3(e)) {
10011
9942
  if (!results.write(withFileTypes ? e : e.fullpath())) {
10012
9943
  paused = true;
10013
9944
  }
@@ -10033,9 +9964,9 @@ var PathScurryBase = class {
10033
9964
  process2();
10034
9965
  return results;
10035
9966
  }
10036
- chdir(path5 = this.cwd) {
9967
+ chdir(path4 = this.cwd) {
10037
9968
  const oldCwd = this.cwd;
10038
- this.cwd = typeof path5 === "string" ? this.cwd.resolve(path5) : path5;
9969
+ this.cwd = typeof path4 === "string" ? this.cwd.resolve(path4) : path4;
10039
9970
  this.cwd[setAsCwd](oldCwd);
10040
9971
  }
10041
9972
  };
@@ -10391,8 +10322,8 @@ var MatchRecord = class {
10391
10322
  }
10392
10323
  // match, absolute, ifdir
10393
10324
  entries() {
10394
- return [...this.store.entries()].map(([path5, n]) => [
10395
- path5,
10325
+ return [...this.store.entries()].map(([path4, n]) => [
10326
+ path4,
10396
10327
  !!(n & 2),
10397
10328
  !!(n & 1)
10398
10329
  ]);
@@ -10597,9 +10528,9 @@ var GlobUtil = class {
10597
10528
  signal;
10598
10529
  maxDepth;
10599
10530
  includeChildMatches;
10600
- constructor(patterns, path5, opts) {
10531
+ constructor(patterns, path4, opts) {
10601
10532
  this.patterns = patterns;
10602
- this.path = path5;
10533
+ this.path = path4;
10603
10534
  this.opts = opts;
10604
10535
  this.#sep = !opts.posix && opts.platform === "win32" ? "\\" : "/";
10605
10536
  this.includeChildMatches = opts.includeChildMatches !== false;
@@ -10618,11 +10549,11 @@ var GlobUtil = class {
10618
10549
  });
10619
10550
  }
10620
10551
  }
10621
- #ignored(path5) {
10622
- return this.seen.has(path5) || !!this.#ignore?.ignored?.(path5);
10552
+ #ignored(path4) {
10553
+ return this.seen.has(path4) || !!this.#ignore?.ignored?.(path4);
10623
10554
  }
10624
- #childrenIgnored(path5) {
10625
- return !!this.#ignore?.childrenIgnored?.(path5);
10555
+ #childrenIgnored(path4) {
10556
+ return !!this.#ignore?.childrenIgnored?.(path4);
10626
10557
  }
10627
10558
  // backpressure mechanism
10628
10559
  pause() {
@@ -10837,8 +10768,8 @@ var GlobUtil = class {
10837
10768
  };
10838
10769
  var GlobWalker = class extends GlobUtil {
10839
10770
  matches = /* @__PURE__ */ new Set();
10840
- constructor(patterns, path5, opts) {
10841
- super(patterns, path5, opts);
10771
+ constructor(patterns, path4, opts) {
10772
+ super(patterns, path4, opts);
10842
10773
  }
10843
10774
  matchEmit(e) {
10844
10775
  this.matches.add(e);
@@ -10875,8 +10806,8 @@ var GlobWalker = class extends GlobUtil {
10875
10806
  };
10876
10807
  var GlobStream = class extends GlobUtil {
10877
10808
  results;
10878
- constructor(patterns, path5, opts) {
10879
- super(patterns, path5, opts);
10809
+ constructor(patterns, path4, opts) {
10810
+ super(patterns, path4, opts);
10880
10811
  this.results = new Minipass({
10881
10812
  signal: this.signal,
10882
10813
  objectMode: true
@@ -11354,8 +11285,12 @@ var vueMajor = detectVueMajor();
11354
11285
  var packageJson = readJsonFile("package.json");
11355
11286
  var dependencies = Object.keys(packageJson.dependencies ?? {});
11356
11287
  var peerDependencies = Object.keys(packageJson.peerDependencies ?? {});
11288
+ var externalDependencies = packageJson.externalDependencies;
11357
11289
  var allDependencies = [...dependencies, ...peerDependencies].sort();
11358
- var external = /* @__PURE__ */ new Set([...allDependencies]);
11290
+ var external = /* @__PURE__ */ new Set([
11291
+ ...externalDependencies ?? dependencies,
11292
+ ...peerDependencies
11293
+ ]);
11359
11294
  console.log(
11360
11295
  "Building",
11361
11296
  import_picocolors.default.cyan(packageJson.name),
@@ -11367,17 +11302,16 @@ var internalDependencies = detectInternalDependencies(
11367
11302
  packages,
11368
11303
  allDependencies
11369
11304
  );
11370
- var defaultPlugins = [indexHtmlPlugin(), packageJsonPlugin(), vuePlugin()];
11305
+ var defaultPlugins = [
11306
+ indexHtmlPlugin(),
11307
+ packageJsonPlugin(),
11308
+ vuePlugin(),
11309
+ customMappingPlugin(),
11310
+ babelPlugin()
11311
+ ];
11371
11312
  var defaultConfig = {
11372
11313
  fk: {},
11373
11314
  plugins: defaultPlugins,
11374
- resolve: {
11375
- alias: Object.fromEntries(
11376
- internalDependencies.map((it) => {
11377
- return [it.name, it.srcPath];
11378
- })
11379
- )
11380
- },
11381
11315
  optimizeDeps: {
11382
11316
  /**
11383
11317
  * Vite treats monorepo packages as sourcecode and performs no prebundling by default.
@@ -11390,22 +11324,16 @@ var defaultConfig = {
11390
11324
  emptyOutDir: false,
11391
11325
  minify: false,
11392
11326
  sourcemap: true,
11393
- outDir: "",
11327
+ outDir: "dist/[custom-format]",
11394
11328
  lib: {
11395
11329
  entry: "src/index.ts",
11396
11330
  formats: ["es", "cjs"]
11397
11331
  },
11398
11332
  rollupOptions: {
11399
11333
  output: {
11400
- entryFileNames: `temp/index.[format].js`,
11334
+ entryFileNames: `index.[custom-format].js`,
11401
11335
  globals: {
11402
11336
  vue: "Vue"
11403
- },
11404
- assetFileNames(assetInfo) {
11405
- if (assetInfo.name === "style.css") {
11406
- return "dist/style.css";
11407
- }
11408
- return assetInfo.name ?? "";
11409
11337
  }
11410
11338
  },
11411
11339
  external: Array.from(external)