@feedmepos/mf-common 1.6.3-rc.1 → 1.6.3-rc.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/vite-preset.js +6 -6
- package/package.json +1 -1
package/dist/vite-preset.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { resolve as
|
1
|
+
import { resolve as h } from "path";
|
2
2
|
import { readFileSync as v } from "fs";
|
3
3
|
const b = (l) => {
|
4
4
|
const s = l.join("|");
|
@@ -65,7 +65,7 @@ const b = (l) => {
|
|
65
65
|
}, y = "@feedmepos/mf-", P = (l, { command: s, mode: e }, r = {}) => {
|
66
66
|
var m, d, f, g;
|
67
67
|
const n = JSON.parse(
|
68
|
-
v(
|
68
|
+
v(h(process.cwd(), "package.json"), "utf-8")
|
69
69
|
), c = Object.keys(n.dependencies).filter((t) => t.startsWith(y)).reduce((t, i) => (t[i] = n.dependencies[i], t), {});
|
70
70
|
(m = r.includeFmmfPackages) == null || m.forEach((t) => {
|
71
71
|
c[t] = n.dependencies[t] ?? "latest";
|
@@ -80,11 +80,11 @@ const b = (l) => {
|
|
80
80
|
};
|
81
81
|
let u = [...Object.keys(o), ...Object.keys(c)];
|
82
82
|
const p = { ...l };
|
83
|
-
s == "build" && e
|
83
|
+
s == "build" && e.startsWith("fmmf") && (u = [...Object.keys(c), ...Object.keys(o)], p.build = {
|
84
84
|
emptyOutDir: !0,
|
85
85
|
lib: {
|
86
86
|
entry: {
|
87
|
-
app:
|
87
|
+
app: h(process.cwd(), "src/app.ts")
|
88
88
|
},
|
89
89
|
formats: ["es"]
|
90
90
|
},
|
@@ -104,7 +104,7 @@ const b = (l) => {
|
|
104
104
|
else
|
105
105
|
throw new Error(`Invalid replaceFmmfPackages key: ${t}, must start with @feedmepos/mf-`);
|
106
106
|
});
|
107
|
-
const
|
107
|
+
const x = {
|
108
108
|
name: "vite-plugin-feedme-microfrontend",
|
109
109
|
enforce: "pre",
|
110
110
|
config: async () => {
|
@@ -135,7 +135,7 @@ const b = (l) => {
|
|
135
135
|
}
|
136
136
|
}
|
137
137
|
};
|
138
|
-
return p.plugins.push(
|
138
|
+
return p.plugins.push(x), p;
|
139
139
|
};
|
140
140
|
export {
|
141
141
|
P as fmmfVitePresent
|