mirror of
https://github.com/zhigang1992/nativewind.git
synced 2026-06-17 03:58:57 +08:00
@@ -103,7 +103,7 @@ export default function rootVisitor(
|
|||||||
content: [filename],
|
content: [filename],
|
||||||
// If the file doesn't have any Tailwind styles, it will print a warning
|
// If the file doesn't have any Tailwind styles, it will print a warning
|
||||||
// We force an empty style to prevent this
|
// We force an empty style to prevent this
|
||||||
safelist: [".native-hmr-empty"],
|
safelist: ["native-empty"],
|
||||||
});
|
});
|
||||||
|
|
||||||
const bodyNode = path.node.body;
|
const bodyNode = path.node.body;
|
||||||
|
|||||||
@@ -39,7 +39,10 @@ export const nativePlugin = plugin.withOptions<NativePluginOptions | undefined>(
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (helpers) => {
|
return (helpers) => {
|
||||||
helpers.addUtilities({ ".native-empty": {} });
|
// This helper is used by babel to stop warnings from being printed
|
||||||
|
// on files without styles when using Hot Module Reload.
|
||||||
|
// Because it doesn't have any styles, it will be omitted from the output
|
||||||
|
helpers.addUtilities({ ".babel-empty": {} });
|
||||||
|
|
||||||
color(helpers, notSupported);
|
color(helpers, notSupported);
|
||||||
space(helpers, notSupported);
|
space(helpers, notSupported);
|
||||||
|
|||||||
Reference in New Issue
Block a user