@granite-js/plugin-micro-frontend 0.1.7 → 0.1.9
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/CHANGELOG.md +16 -0
- package/dist/index.cjs +4 -2
- package/dist/index.js +4 -2
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @granite-js/plugin-micro-frontend
|
|
2
2
|
|
|
3
|
+
## 0.1.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [935bb36]
|
|
8
|
+
- @granite-js/plugin-core@0.1.9
|
|
9
|
+
- @granite-js/utils@0.1.9
|
|
10
|
+
|
|
11
|
+
## 0.1.8
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [b69366c]
|
|
16
|
+
- @granite-js/plugin-core@0.1.8
|
|
17
|
+
- @granite-js/utils@0.1.8
|
|
18
|
+
|
|
3
19
|
## 0.1.7
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -23,6 +23,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
23
23
|
//#endregion
|
|
24
24
|
const fs = __toESM(require("fs"));
|
|
25
25
|
const path = __toESM(require("path"));
|
|
26
|
+
const __granite_js_utils = __toESM(require("@granite-js/utils"));
|
|
26
27
|
const picocolors = __toESM(require("picocolors"));
|
|
27
28
|
|
|
28
29
|
//#region src/prelude.ts
|
|
@@ -164,9 +165,10 @@ function intoShared(shared) {
|
|
|
164
165
|
const microFrontendPlugin = async (options) => {
|
|
165
166
|
const sharedEntries = Object.entries(intoShared(options.shared) ?? {});
|
|
166
167
|
const nonEagerEntries = sharedEntries.filter(([_, config]) => config.eager !== true);
|
|
168
|
+
const rootDir = process.cwd();
|
|
167
169
|
const preludeConfig = getPreludeConfig(options);
|
|
168
|
-
const
|
|
169
|
-
|
|
170
|
+
const localDir = (0, __granite_js_utils.prepareLocalDirectory)(rootDir);
|
|
171
|
+
const preludePath = path.join(localDir, "micro-frontend-runtime.js");
|
|
170
172
|
fs.writeFileSync(preludePath, preludeConfig.preludeScript);
|
|
171
173
|
/**
|
|
172
174
|
* @TODO `MPACK_DEV_SERVER` flag should be removed after next version of bundle loader is released and load bundle dynamically at JS runtime.
|
package/dist/index.js
CHANGED
|
@@ -3,6 +3,7 @@ import * as fs from "fs";
|
|
|
3
3
|
import * as path$2 from "path";
|
|
4
4
|
import * as path$1 from "path";
|
|
5
5
|
import path from "path";
|
|
6
|
+
import { prepareLocalDirectory } from "@granite-js/utils";
|
|
6
7
|
import pc from "picocolors";
|
|
7
8
|
|
|
8
9
|
//#region rolldown:runtime
|
|
@@ -148,9 +149,10 @@ function intoShared(shared) {
|
|
|
148
149
|
const microFrontendPlugin = async (options) => {
|
|
149
150
|
const sharedEntries = Object.entries(intoShared(options.shared) ?? {});
|
|
150
151
|
const nonEagerEntries = sharedEntries.filter(([_, config]) => config.eager !== true);
|
|
152
|
+
const rootDir = process.cwd();
|
|
151
153
|
const preludeConfig = getPreludeConfig(options);
|
|
152
|
-
const
|
|
153
|
-
|
|
154
|
+
const localDir = prepareLocalDirectory(rootDir);
|
|
155
|
+
const preludePath = path$1.join(localDir, "micro-frontend-runtime.js");
|
|
154
156
|
fs.writeFileSync(preludePath, preludeConfig.preludeScript);
|
|
155
157
|
/**
|
|
156
158
|
* @TODO `MPACK_DEV_SERVER` flag should be removed after next version of bundle loader is released and load bundle dynamically at JS runtime.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@granite-js/plugin-micro-frontend",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.9",
|
|
5
5
|
"description": "Plugin for micro frontend",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"prepack": "yarn build",
|
|
@@ -32,8 +32,9 @@
|
|
|
32
32
|
"vitest": "^3.2.4"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@granite-js/plugin-core": "0.1.
|
|
36
|
-
"
|
|
35
|
+
"@granite-js/plugin-core": "0.1.9",
|
|
36
|
+
"@granite-js/utils": "0.1.9",
|
|
37
|
+
"es-toolkit": "^1.39.8",
|
|
37
38
|
"picocolors": "^1.1.1"
|
|
38
39
|
},
|
|
39
40
|
"sideEffects": false
|