@plumeria/turbopack-loader 16.2.1 → 16.2.3
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/index.js +17 -5
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -96,6 +96,10 @@ async function loader(source) {
|
|
|
96
96
|
const actualPath = (0, utils_1.resolveImportPath)(sourcePath, resourcePath);
|
|
97
97
|
if (actualPath) {
|
|
98
98
|
this.addDependency(actualPath);
|
|
99
|
+
const transDeps = (0, utils_1.getFileDependencies)(actualPath);
|
|
100
|
+
for (const dep of transDeps) {
|
|
101
|
+
this.addDependency(dep);
|
|
102
|
+
}
|
|
99
103
|
}
|
|
100
104
|
}
|
|
101
105
|
}
|
|
@@ -148,12 +152,20 @@ async function loader(source) {
|
|
|
148
152
|
const actualPath = (0, utils_1.resolveImportPath)(sourcePath, resourcePath);
|
|
149
153
|
if (actualPath) {
|
|
150
154
|
node.specifiers.forEach((specifier) => {
|
|
151
|
-
if (specifier.type === 'ImportSpecifier'
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
+
if (specifier.type === 'ImportSpecifier' ||
|
|
156
|
+
specifier.type === 'ImportDefaultSpecifier') {
|
|
157
|
+
const importedName = specifier.type === 'ImportDefaultSpecifier'
|
|
158
|
+
? 'default'
|
|
159
|
+
: specifier.imported
|
|
160
|
+
? specifier.imported.value
|
|
161
|
+
: specifier.local.value;
|
|
155
162
|
const localName = specifier.local.value;
|
|
156
|
-
|
|
163
|
+
let resolvedKey = `${actualPath}-${importedName}`;
|
|
164
|
+
const resolved = (0, utils_1.resolveExport)(actualPath, importedName);
|
|
165
|
+
if (resolved) {
|
|
166
|
+
resolvedKey = `${resolved.filePath}-${resolved.localName}`;
|
|
167
|
+
}
|
|
168
|
+
const uniqueKey = resolvedKey;
|
|
157
169
|
localImports[localName] = { actualPath, importedName };
|
|
158
170
|
if (scannedTables.staticTable[uniqueKey]) {
|
|
159
171
|
importMap[localName] = scannedTables.staticTable[uniqueKey];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plumeria/turbopack-loader",
|
|
3
|
-
"version": "16.2.
|
|
3
|
+
"version": "16.2.3",
|
|
4
4
|
"description": "Plumeria Turbopack-loader",
|
|
5
5
|
"author": "Refirst 11",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"zero-virtual.css"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@plumeria/utils": "^16.2.
|
|
25
|
+
"@plumeria/utils": "^16.2.3"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@swc/core": "1.15.43",
|