@plumeria/compiler 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 +13 -5
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -153,12 +153,20 @@ function compileCSS(options) {
|
|
|
153
153
|
const actualPath = (0, utils_1.resolveImportPath)(sourcePath, resourcePath);
|
|
154
154
|
if (actualPath) {
|
|
155
155
|
node.specifiers.forEach((specifier) => {
|
|
156
|
-
if (specifier.type === 'ImportSpecifier'
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
156
|
+
if (specifier.type === 'ImportSpecifier' ||
|
|
157
|
+
specifier.type === 'ImportDefaultSpecifier') {
|
|
158
|
+
const importedName = specifier.type === 'ImportDefaultSpecifier'
|
|
159
|
+
? 'default'
|
|
160
|
+
: specifier.imported
|
|
161
|
+
? specifier.imported.value
|
|
162
|
+
: specifier.local.value;
|
|
160
163
|
const localName = specifier.local.value;
|
|
161
|
-
|
|
164
|
+
let resolvedKey = `${actualPath}-${importedName}`;
|
|
165
|
+
const resolved = (0, utils_1.resolveExport)(actualPath, importedName);
|
|
166
|
+
if (resolved) {
|
|
167
|
+
resolvedKey = `${resolved.filePath}-${resolved.localName}`;
|
|
168
|
+
}
|
|
169
|
+
const uniqueKey = resolvedKey;
|
|
162
170
|
localImports[localName] = { actualPath, importedName };
|
|
163
171
|
if (scannedTables.staticTable[uniqueKey])
|
|
164
172
|
importMap[localName] = scannedTables.staticTable[uniqueKey];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plumeria/compiler",
|
|
3
|
-
"version": "16.2.
|
|
3
|
+
"version": "16.2.3",
|
|
4
4
|
"description": "Plumeria swc based compiler for statically extracting css",
|
|
5
5
|
"author": "Refirst 11",
|
|
6
6
|
"license": "MIT",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dist/"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@plumeria/utils": "^16.2.
|
|
24
|
+
"@plumeria/utils": "^16.2.3"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@rust-gear/glob": "1.0.0",
|