primate 0.20.3 → 0.20.5
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/package.json +1 -1
- package/src/app.js +9 -7
package/package.json
CHANGED
package/src/app.js
CHANGED
|
@@ -139,16 +139,18 @@ export default async (config, root, log) => {
|
|
|
139
139
|
const exports = pkg.exports === undefined
|
|
140
140
|
? {[module]: `/${module}/${pkg.main}`}
|
|
141
141
|
: transform(pkg.exports, entry => entry
|
|
142
|
-
.filter(([, _export]) => _export.
|
|
142
|
+
.filter(([, _export]) => _export.browser?.default !== undefined
|
|
143
|
+
|| _export.import !== undefined
|
|
144
|
+
|| _export.default !== undefined)
|
|
143
145
|
.map(([key, value]) => [
|
|
144
146
|
key.replace(".", module),
|
|
145
|
-
value.
|
|
147
|
+
value.browser?.default.replace(".", `./${module}`)
|
|
148
|
+
?? value.default?.replace(".", `./${module}`)
|
|
149
|
+
?? value.import?.replace(".", `./${module}`),
|
|
146
150
|
]));
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
type: "module",
|
|
151
|
-
})));
|
|
151
|
+
const dependency = Path.resolve().join(...path);
|
|
152
|
+
const to = new Path(paths.client, build.modules, dependency.name);
|
|
153
|
+
await dependency.file.copy(to);
|
|
152
154
|
this.importmaps = {
|
|
153
155
|
...valmap(exports, value => new Path(root, build.modules, value).path),
|
|
154
156
|
...this.importmaps};
|