We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6cbc05b commit 21c8a68Copy full SHA for 21c8a68
src/modules/tagInfo.ts
@@ -70,5 +70,6 @@ export const getTagInfo = async ({
70
71
export const removeSrcAttribute = (attributes: Record<string, any>) => {
72
const { src, ...rest } = attributes;
73
+
74
return rest;
75
};
src/transformers/globalStyle.ts
@@ -83,18 +83,16 @@ const transformer: Transformer<Options.GlobalStyle> = async ({
83
map: options?.sourceMap ? { prev: map } : false,
84
});
85
86
+ if (attributes?.global) {
87
+ const { global, ...rest } = attributes;
88
89
+ attributes = rest;
90
+ }
91
92
return {
93
code: css,
94
map: newMap,
- attributes:
- attributes &&
- Object.keys(attributes).reduce((acc: any, key) => {
- if (key !== 'global') {
- acc[key] = attributes[key];
- }
95
-
96
- return acc;
97
- }, {}),
+ attributes,
98
99
100
0 commit comments