mirror of
https://github.com/zhigang1992/nativewind.git
synced 2026-06-15 10:17:54 +08:00
@@ -103,7 +103,7 @@ export default function rootVisitor(
|
||||
content: [filename],
|
||||
// If the file doesn't have any Tailwind styles, it will print a warning
|
||||
// We force an empty style to prevent this
|
||||
safelist: [".native-hmr-empty"],
|
||||
safelist: ["native-empty"],
|
||||
});
|
||||
|
||||
const bodyNode = path.node.body;
|
||||
|
||||
@@ -39,7 +39,10 @@ export const nativePlugin = plugin.withOptions<NativePluginOptions | undefined>(
|
||||
}
|
||||
|
||||
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);
|
||||
space(helpers, notSupported);
|
||||
|
||||
Reference in New Issue
Block a user