@forsakringskassan/vite-lib-config 5.12.2 → 5.12.4
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/vite.config.cjs +23 -12
- package/dist/vite.config.mjs +23 -12
- package/package.json +1 -1
package/dist/vite.config.cjs
CHANGED
|
@@ -860,8 +860,8 @@ var require_picocolors = __commonJS({
|
|
|
860
860
|
"node_modules/picocolors/picocolors.js"(exports2, module2) {
|
|
861
861
|
var p = process || {};
|
|
862
862
|
var argv = p.argv || [];
|
|
863
|
-
var
|
|
864
|
-
var isColorSupported = !(!!
|
|
863
|
+
var env2 = p.env || {};
|
|
864
|
+
var isColorSupported = !(!!env2.NO_COLOR || argv.includes("--no-color")) && (!!env2.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env2.TERM !== "dumb" || !!env2.CI);
|
|
865
865
|
var formatter = (open, close, replace = open) => (input) => {
|
|
866
866
|
let string = "" + input, index = string.indexOf(close, open.length);
|
|
867
867
|
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
@@ -4742,7 +4742,7 @@ var import_node_path = __toESM(require("node:path"), 1);
|
|
|
4742
4742
|
var import_node_crypto = __toESM(require("node:crypto"), 1);
|
|
4743
4743
|
var import_node_tty = require("node:tty");
|
|
4744
4744
|
var import_node_util = require("node:util");
|
|
4745
|
-
var version = "6.0.
|
|
4745
|
+
var version = "6.0.9";
|
|
4746
4746
|
function resolveCompiler(root) {
|
|
4747
4747
|
const compiler = tryResolveCompiler(root) || tryResolveCompiler();
|
|
4748
4748
|
if (!compiler) throw new Error("Failed to resolve vue/compiler-sfc.\n@vitejs/plugin-vue requires vue (>=3.2.25) to be present in the dependency tree.");
|
|
@@ -5624,7 +5624,7 @@ function createDebug$1(namespace, options) {
|
|
|
5624
5624
|
let enableOverride;
|
|
5625
5625
|
let namespacesCache;
|
|
5626
5626
|
let enabledCache;
|
|
5627
|
-
const debug2 = (...args) => {
|
|
5627
|
+
const debug2 = ((...args) => {
|
|
5628
5628
|
if (!debug2.enabled) return;
|
|
5629
5629
|
const curr = Date.now();
|
|
5630
5630
|
const diff = curr - (prevTime || curr);
|
|
@@ -5646,7 +5646,7 @@ function createDebug$1(namespace, options) {
|
|
|
5646
5646
|
});
|
|
5647
5647
|
options.formatArgs.call(debug2, diff, args);
|
|
5648
5648
|
debug2.log(...args);
|
|
5649
|
-
};
|
|
5649
|
+
});
|
|
5650
5650
|
debug2.extend = function(namespace2, delimiter = ":") {
|
|
5651
5651
|
return createDebug$1(this.namespace + delimiter + namespace2, {
|
|
5652
5652
|
useColors: this.useColors,
|
|
@@ -5692,7 +5692,13 @@ function enabled(name) {
|
|
|
5692
5692
|
for (const ns2 of names) if (matchesTemplate(name, ns2)) return true;
|
|
5693
5693
|
return false;
|
|
5694
5694
|
}
|
|
5695
|
-
var
|
|
5695
|
+
var env = {};
|
|
5696
|
+
try {
|
|
5697
|
+
process.env.DEBUG;
|
|
5698
|
+
env = process.env;
|
|
5699
|
+
} catch (_unused) {
|
|
5700
|
+
}
|
|
5701
|
+
var colors = process.stderr.getColorDepth && process.stderr.getColorDepth(env) > 2 ? [
|
|
5696
5702
|
20,
|
|
5697
5703
|
21,
|
|
5698
5704
|
26,
|
|
@@ -5777,9 +5783,9 @@ var colors = process.stderr.getColorDepth && process.stderr.getColorDepth() > 2
|
|
|
5777
5783
|
5,
|
|
5778
5784
|
1
|
|
5779
5785
|
];
|
|
5780
|
-
var inspectOpts = Object.keys(
|
|
5786
|
+
var inspectOpts = Object.keys(env).filter((key) => /^debug_/i.test(key)).reduce((obj, key) => {
|
|
5781
5787
|
const prop = key.slice(6).toLowerCase().replace(/_([a-z])/g, (_2, k2) => k2.toUpperCase());
|
|
5782
|
-
let value =
|
|
5788
|
+
let value = env[key];
|
|
5783
5789
|
const lowerCase = typeof value === "string" && value.toLowerCase();
|
|
5784
5790
|
if (value === "null") value = null;
|
|
5785
5791
|
else if (lowerCase === "yes" || lowerCase === "on" || lowerCase === "true" || lowerCase === "enabled") value = true;
|
|
@@ -5838,7 +5844,7 @@ function createDebug(namespace, options) {
|
|
|
5838
5844
|
const color = (_ref = options && options.color) !== null && _ref !== void 0 ? _ref : selectColor(colors, namespace);
|
|
5839
5845
|
return createDebug$1(namespace, Object.assign(defaultOptions, { color }, options));
|
|
5840
5846
|
}
|
|
5841
|
-
enable(
|
|
5847
|
+
enable(env.DEBUG || "");
|
|
5842
5848
|
var debug = createDebug("vite:hmr");
|
|
5843
5849
|
async function handleHotUpdate({ file, modules, read }, options, customElement, typeDepModules) {
|
|
5844
5850
|
const prevDescriptor = getDescriptor(file, options, false, true);
|
|
@@ -5991,6 +5997,7 @@ export default (sfc, props) => {
|
|
|
5991
5997
|
return target;
|
|
5992
5998
|
}
|
|
5993
5999
|
`;
|
|
6000
|
+
var emptyScriptLangRE = /<script[^>]*\slang\s*=\s*["']?(tsx?)\b[^>]*?(?:\/>|>\s*<\/script\s*>)/;
|
|
5994
6001
|
async function transformMain(code2, filename, options, pluginContext, ssr, customElement) {
|
|
5995
6002
|
const { devServer, isProduction, devToolsEnabled } = options;
|
|
5996
6003
|
const prevDescriptor = getPrevDescriptor(filename);
|
|
@@ -6067,7 +6074,7 @@ async function transformMain(code2, filename, options, pluginContext, ssr, custo
|
|
|
6067
6074
|
if (!attachedProps.length) output.push(`export default _sfc_main`);
|
|
6068
6075
|
else output.push(`import _export_sfc from '${EXPORT_HELPER_ID}'`, `export default /*#__PURE__*/_export_sfc(_sfc_main, [${attachedProps.map(([key, val]) => `['${key}',${val}]`).join(",")}])`);
|
|
6069
6076
|
let resolvedCode = output.join("\n");
|
|
6070
|
-
const lang = descriptor.scriptSetup?.lang || descriptor.script?.lang;
|
|
6077
|
+
const lang = descriptor.scriptSetup?.lang || descriptor.script?.lang || emptyScriptLangRE.exec(code2)?.[1];
|
|
6071
6078
|
if (lang && /tsx?$/.test(lang) && !descriptor.script?.src) {
|
|
6072
6079
|
const { transformWithOxc } = await import("vite");
|
|
6073
6080
|
if (transformWithOxc) {
|
|
@@ -6336,8 +6343,10 @@ function vuePlugin(rawOptions = {}) {
|
|
|
6336
6343
|
};
|
|
6337
6344
|
},
|
|
6338
6345
|
configResolved(config) {
|
|
6346
|
+
const { compiler, ...rest } = options.value;
|
|
6339
6347
|
options.value = {
|
|
6340
|
-
|
|
6348
|
+
compiler: compiler ?? resolveCompiler(config.root),
|
|
6349
|
+
...rest,
|
|
6341
6350
|
root: config.root,
|
|
6342
6351
|
sourceMap: config.command === "build" ? !!config.build.sourcemap : true,
|
|
6343
6352
|
cssDevSourcemap: config.css?.devSourcemap ?? false,
|
|
@@ -11348,7 +11357,9 @@ var defaultConfig = {
|
|
|
11348
11357
|
outDir: "dist/[custom-format]",
|
|
11349
11358
|
lib: {
|
|
11350
11359
|
entry: lookupFile("src/index"),
|
|
11351
|
-
formats: ["es", "cjs"]
|
|
11360
|
+
formats: ["es", "cjs"],
|
|
11361
|
+
/* use a fixed and deterministic filename */
|
|
11362
|
+
cssFileName: "style"
|
|
11352
11363
|
},
|
|
11353
11364
|
rollupOptions: {
|
|
11354
11365
|
output: {
|
package/dist/vite.config.mjs
CHANGED
|
@@ -858,8 +858,8 @@ var require_picocolors = __commonJS({
|
|
|
858
858
|
"node_modules/picocolors/picocolors.js"(exports, module) {
|
|
859
859
|
var p = process || {};
|
|
860
860
|
var argv = p.argv || [];
|
|
861
|
-
var
|
|
862
|
-
var isColorSupported = !(!!
|
|
861
|
+
var env2 = p.env || {};
|
|
862
|
+
var isColorSupported = !(!!env2.NO_COLOR || argv.includes("--no-color")) && (!!env2.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env2.TERM !== "dumb" || !!env2.CI);
|
|
863
863
|
var formatter = (open, close, replace = open) => (input) => {
|
|
864
864
|
let string = "" + input, index = string.indexOf(close, open.length);
|
|
865
865
|
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
@@ -4734,7 +4734,7 @@ import path from "node:path";
|
|
|
4734
4734
|
import crypto from "node:crypto";
|
|
4735
4735
|
import { isatty } from "node:tty";
|
|
4736
4736
|
import { formatWithOptions, inspect } from "node:util";
|
|
4737
|
-
var version = "6.0.
|
|
4737
|
+
var version = "6.0.9";
|
|
4738
4738
|
function resolveCompiler(root) {
|
|
4739
4739
|
const compiler = tryResolveCompiler(root) || tryResolveCompiler();
|
|
4740
4740
|
if (!compiler) throw new Error("Failed to resolve vue/compiler-sfc.\n@vitejs/plugin-vue requires vue (>=3.2.25) to be present in the dependency tree.");
|
|
@@ -5616,7 +5616,7 @@ function createDebug$1(namespace, options) {
|
|
|
5616
5616
|
let enableOverride;
|
|
5617
5617
|
let namespacesCache;
|
|
5618
5618
|
let enabledCache;
|
|
5619
|
-
const debug2 = (...args) => {
|
|
5619
|
+
const debug2 = ((...args) => {
|
|
5620
5620
|
if (!debug2.enabled) return;
|
|
5621
5621
|
const curr = Date.now();
|
|
5622
5622
|
const diff = curr - (prevTime || curr);
|
|
@@ -5638,7 +5638,7 @@ function createDebug$1(namespace, options) {
|
|
|
5638
5638
|
});
|
|
5639
5639
|
options.formatArgs.call(debug2, diff, args);
|
|
5640
5640
|
debug2.log(...args);
|
|
5641
|
-
};
|
|
5641
|
+
});
|
|
5642
5642
|
debug2.extend = function(namespace2, delimiter = ":") {
|
|
5643
5643
|
return createDebug$1(this.namespace + delimiter + namespace2, {
|
|
5644
5644
|
useColors: this.useColors,
|
|
@@ -5684,7 +5684,13 @@ function enabled(name) {
|
|
|
5684
5684
|
for (const ns2 of names) if (matchesTemplate(name, ns2)) return true;
|
|
5685
5685
|
return false;
|
|
5686
5686
|
}
|
|
5687
|
-
var
|
|
5687
|
+
var env = {};
|
|
5688
|
+
try {
|
|
5689
|
+
process.env.DEBUG;
|
|
5690
|
+
env = process.env;
|
|
5691
|
+
} catch (_unused) {
|
|
5692
|
+
}
|
|
5693
|
+
var colors = process.stderr.getColorDepth && process.stderr.getColorDepth(env) > 2 ? [
|
|
5688
5694
|
20,
|
|
5689
5695
|
21,
|
|
5690
5696
|
26,
|
|
@@ -5769,9 +5775,9 @@ var colors = process.stderr.getColorDepth && process.stderr.getColorDepth() > 2
|
|
|
5769
5775
|
5,
|
|
5770
5776
|
1
|
|
5771
5777
|
];
|
|
5772
|
-
var inspectOpts = Object.keys(
|
|
5778
|
+
var inspectOpts = Object.keys(env).filter((key) => /^debug_/i.test(key)).reduce((obj, key) => {
|
|
5773
5779
|
const prop = key.slice(6).toLowerCase().replace(/_([a-z])/g, (_2, k2) => k2.toUpperCase());
|
|
5774
|
-
let value =
|
|
5780
|
+
let value = env[key];
|
|
5775
5781
|
const lowerCase = typeof value === "string" && value.toLowerCase();
|
|
5776
5782
|
if (value === "null") value = null;
|
|
5777
5783
|
else if (lowerCase === "yes" || lowerCase === "on" || lowerCase === "true" || lowerCase === "enabled") value = true;
|
|
@@ -5830,7 +5836,7 @@ function createDebug(namespace, options) {
|
|
|
5830
5836
|
const color = (_ref = options && options.color) !== null && _ref !== void 0 ? _ref : selectColor(colors, namespace);
|
|
5831
5837
|
return createDebug$1(namespace, Object.assign(defaultOptions, { color }, options));
|
|
5832
5838
|
}
|
|
5833
|
-
enable(
|
|
5839
|
+
enable(env.DEBUG || "");
|
|
5834
5840
|
var debug = createDebug("vite:hmr");
|
|
5835
5841
|
async function handleHotUpdate({ file, modules, read }, options, customElement, typeDepModules) {
|
|
5836
5842
|
const prevDescriptor = getDescriptor(file, options, false, true);
|
|
@@ -5983,6 +5989,7 @@ export default (sfc, props) => {
|
|
|
5983
5989
|
return target;
|
|
5984
5990
|
}
|
|
5985
5991
|
`;
|
|
5992
|
+
var emptyScriptLangRE = /<script[^>]*\slang\s*=\s*["']?(tsx?)\b[^>]*?(?:\/>|>\s*<\/script\s*>)/;
|
|
5986
5993
|
async function transformMain(code2, filename, options, pluginContext, ssr, customElement) {
|
|
5987
5994
|
const { devServer, isProduction, devToolsEnabled } = options;
|
|
5988
5995
|
const prevDescriptor = getPrevDescriptor(filename);
|
|
@@ -6059,7 +6066,7 @@ async function transformMain(code2, filename, options, pluginContext, ssr, custo
|
|
|
6059
6066
|
if (!attachedProps.length) output.push(`export default _sfc_main`);
|
|
6060
6067
|
else output.push(`import _export_sfc from '${EXPORT_HELPER_ID}'`, `export default /*#__PURE__*/_export_sfc(_sfc_main, [${attachedProps.map(([key, val]) => `['${key}',${val}]`).join(",")}])`);
|
|
6061
6068
|
let resolvedCode = output.join("\n");
|
|
6062
|
-
const lang = descriptor.scriptSetup?.lang || descriptor.script?.lang;
|
|
6069
|
+
const lang = descriptor.scriptSetup?.lang || descriptor.script?.lang || emptyScriptLangRE.exec(code2)?.[1];
|
|
6063
6070
|
if (lang && /tsx?$/.test(lang) && !descriptor.script?.src) {
|
|
6064
6071
|
const { transformWithOxc } = await import("vite");
|
|
6065
6072
|
if (transformWithOxc) {
|
|
@@ -6328,8 +6335,10 @@ function vuePlugin(rawOptions = {}) {
|
|
|
6328
6335
|
};
|
|
6329
6336
|
},
|
|
6330
6337
|
configResolved(config) {
|
|
6338
|
+
const { compiler, ...rest } = options.value;
|
|
6331
6339
|
options.value = {
|
|
6332
|
-
|
|
6340
|
+
compiler: compiler ?? resolveCompiler(config.root),
|
|
6341
|
+
...rest,
|
|
6333
6342
|
root: config.root,
|
|
6334
6343
|
sourceMap: config.command === "build" ? !!config.build.sourcemap : true,
|
|
6335
6344
|
cssDevSourcemap: config.css?.devSourcemap ?? false,
|
|
@@ -11342,7 +11351,9 @@ var defaultConfig = {
|
|
|
11342
11351
|
outDir: "dist/[custom-format]",
|
|
11343
11352
|
lib: {
|
|
11344
11353
|
entry: lookupFile("src/index"),
|
|
11345
|
-
formats: ["es", "cjs"]
|
|
11354
|
+
formats: ["es", "cjs"],
|
|
11355
|
+
/* use a fixed and deterministic filename */
|
|
11356
|
+
cssFileName: "style"
|
|
11346
11357
|
},
|
|
11347
11358
|
rollupOptions: {
|
|
11348
11359
|
output: {
|