package
Allow react-native platform specific extensions to be used for other file types than Javascript.
npm install babel-plugin-react-native-platform-specific-extensionsGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Estimated unpacked size across 8 packages.
1.9 MB
Includes dependencies.
Allow react-native platform specific extensions to be used for other file types than Javascript.
Example:
import styles from "./styles.css";
styles.android.css <- Android onlystyles.ios.css <- iOS onlystyles.native.css <- Both Android and iOSstyles.css <- Default. Android, iOS and Webyarn add --dev babel-plugin-react-native-platform-specific-extensionsor
npm install --save-dev babel-plugin-react-native-platform-specific-extensions.babelrcYou must give one or more file extensions inside an array in the plugin options.
{
"presets": [
"react-native"
],
"plugins": [
["react-native-platform-specific-extensions", {
"extensions": ["css", "scss", "sass"],
}]
]
}require.