@feedmepos/mf-common 1.6.3 → 1.6.4
Sign up to get free protection for your applications and to get access to all the features.
package/dist/vite-preset.d.ts
CHANGED
@@ -4,6 +4,7 @@ export interface FmmfPresentOptions {
|
|
4
4
|
includeFmmfPackages?: string[];
|
5
5
|
replaceFmmfPackages?: Record<string, string>;
|
6
6
|
importMapScopes?: Record<string, string>;
|
7
|
+
isDev?: boolean;
|
7
8
|
}
|
8
9
|
export declare const fmmfVitePresent: (config: UserConfig, { command, mode }: ConfigEnv, options?: FmmfPresentOptions) => UserConfig;
|
9
10
|
//# sourceMappingURL=vite-preset.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"vite-preset.d.ts","sourceRoot":"","sources":["../vite-preset.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAwB,UAAU,EAAE,MAAM,MAAM,CAAA;AAKvE,MAAM,WAAW,kBAAkB;IACjC,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC9B,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC9B,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC5C,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;
|
1
|
+
{"version":3,"file":"vite-preset.d.ts","sourceRoot":"","sources":["../vite-preset.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAwB,UAAU,EAAE,MAAM,MAAM,CAAA;AAKvE,MAAM,WAAW,kBAAkB;IACjC,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC9B,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC9B,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC5C,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACxC,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,eAAO,MAAM,eAAe,WAClB,UAAU,qBACC,SAAS,YACnB,kBAAkB,KAC1B,UAmHF,CAAA"}
|
package/dist/vite-preset.js
CHANGED
@@ -62,11 +62,11 @@ const b = (l) => {
|
|
62
62
|
// [dependency] (imported by [sourceFile])
|
63
63
|
load: (e) => r.includes(e) ? "export default {};" : null
|
64
64
|
};
|
65
|
-
},
|
65
|
+
}, D = "@feedmepos/mf-", P = (l, { command: r, mode: e }, t = {}) => {
|
66
66
|
var m, d, f, g;
|
67
67
|
const p = JSON.parse(
|
68
68
|
v(h(process.cwd(), "package.json"), "utf-8")
|
69
|
-
), c = Object.keys(p.dependencies).filter((s) => s.startsWith(
|
69
|
+
), c = Object.keys(p.dependencies).filter((s) => s.startsWith(D)).reduce((s, i) => (s[i] = p.dependencies[i], s), {});
|
70
70
|
(m = t.includeFmmfPackages) == null || m.forEach((s) => {
|
71
71
|
c[s] = p.dependencies[s] ?? "latest";
|
72
72
|
}), (d = t.excludeFmmfPackages) == null || d.forEach((s) => {
|
@@ -94,7 +94,7 @@ const b = (l) => {
|
|
94
94
|
}), n.plugins ?? (n.plugins = []), n.plugins.push(z({ externals: a })), n.build ?? (n.build = {}), (f = n.build).rollupOptions ?? (f.rollupOptions = {}), (g = n.build.rollupOptions).external ?? (g.external = a);
|
95
95
|
const u = {
|
96
96
|
imports: {
|
97
|
-
...Object.keys(c).reduce((s, i) => (s[i] = `https://cdn.jsdelivr.net/npm/${i}
|
97
|
+
...Object.keys(c).reduce((s, i) => (s[i] = `https://cdn.jsdelivr.net/npm/${i}@${t.isDev ? "latest" : "beta"}/dist/app.js`, s), {}),
|
98
98
|
...Object.keys(o).reduce((s, i) => (s[i] = `https://cdn.jsdelivr.net/npm/${i}@${o[i]}`, s), {})
|
99
99
|
},
|
100
100
|
scopes: t.importMapScopes ?? {}
|