@plumeria/unplugin 18.3.14 → 18.3.15
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/core.js +7 -0
- package/dist/core.mjs +8 -1
- package/package.json +2 -2
package/dist/core.js
CHANGED
|
@@ -301,6 +301,13 @@ const unpluginFactory = (options = {}, unpluginMeta) => {
|
|
|
301
301
|
mergedCreateTable[rootId] !== undefined ||
|
|
302
302
|
mergedVariantsTable[rootId] !== undefined);
|
|
303
303
|
if (!isPlumeriaStyle) {
|
|
304
|
+
const origin = rootId ? localImports[rootId] : undefined;
|
|
305
|
+
const failure = origin
|
|
306
|
+
? (0, utils_1.resolveFileError)(origin.actualPath, origin.importedName)
|
|
307
|
+
: undefined;
|
|
308
|
+
if (failure) {
|
|
309
|
+
throwCompilationError(`Plumeria: ${failure.message} (${path.basename(failure.filePath)})`);
|
|
310
|
+
}
|
|
304
311
|
throwCompilationError(`Plumeria: Dynamic or unresolvable style object "${getSource(node)}" is not supported.`, node);
|
|
305
312
|
}
|
|
306
313
|
}
|
package/dist/core.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { createFilter } from '@rollup/pluginutils';
|
|
|
2
2
|
import { parseSync } from '@swc/core';
|
|
3
3
|
import * as path from 'path';
|
|
4
4
|
import { applyCssValue, genBase36Hash, exceptionCamelCase, camelToKebabCase, isAtRule, } from 'zss-engine';
|
|
5
|
-
import { traverse, collectReferenceIdentifiers, getStyleRecords, getStateWeights, collectLocalConsts, objectExpressionToObject, t, getRootIdentifier, extractOndemandStyles, deepMerge, scanAll, resolveImportPath, getLeadingCommentLength, optimizer, themeHashOf, getFileDependencies, resolveExport, resolveComponentKey, resolveThemeSelector, DEFAULT_STYLE_PROP, } from '@plumeria/utils';
|
|
5
|
+
import { traverse, collectReferenceIdentifiers, getStyleRecords, getStateWeights, collectLocalConsts, objectExpressionToObject, t, getRootIdentifier, extractOndemandStyles, deepMerge, scanAll, resolveFileError, resolveImportPath, getLeadingCommentLength, optimizer, themeHashOf, getFileDependencies, resolveExport, resolveComponentKey, resolveThemeSelector, DEFAULT_STYLE_PROP, } from '@plumeria/utils';
|
|
6
6
|
export const TARGET_EXTENSIONS = ['ts', 'tsx', 'js', 'jsx'];
|
|
7
7
|
export const EXTENSION_PATTERN = /\.(ts|tsx|js|jsx)$/;
|
|
8
8
|
const unwrapExport = (node) => {
|
|
@@ -265,6 +265,13 @@ export const unpluginFactory = (options = {}, unpluginMeta) => {
|
|
|
265
265
|
mergedCreateTable[rootId] !== undefined ||
|
|
266
266
|
mergedVariantsTable[rootId] !== undefined);
|
|
267
267
|
if (!isPlumeriaStyle) {
|
|
268
|
+
const origin = rootId ? localImports[rootId] : undefined;
|
|
269
|
+
const failure = origin
|
|
270
|
+
? resolveFileError(origin.actualPath, origin.importedName)
|
|
271
|
+
: undefined;
|
|
272
|
+
if (failure) {
|
|
273
|
+
throwCompilationError(`Plumeria: ${failure.message} (${path.basename(failure.filePath)})`);
|
|
274
|
+
}
|
|
268
275
|
throwCompilationError(`Plumeria: Dynamic or unresolvable style object "${getSource(node)}" is not supported.`, node);
|
|
269
276
|
}
|
|
270
277
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plumeria/unplugin",
|
|
3
|
-
"version": "18.3.
|
|
3
|
+
"version": "18.3.15",
|
|
4
4
|
"description": "Universal Plumeria plugin for various build tools",
|
|
5
5
|
"author": "Refirst 11",
|
|
6
6
|
"license": "MIT",
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"dependencies": {
|
|
95
95
|
"@rollup/pluginutils": "^5.4.0",
|
|
96
96
|
"unplugin": "^3.0.0",
|
|
97
|
-
"@plumeria/utils": "^18.3.
|
|
97
|
+
"@plumeria/utils": "^18.3.15"
|
|
98
98
|
},
|
|
99
99
|
"devDependencies": {
|
|
100
100
|
"@swc/core": "1.15.47",
|