JSPM

react-native-css-loader

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 36
  • Score
    100M100P100Q73589F
  • License MIT

Package Exports

  • react-native-css-loader

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-native-css-loader) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

react-native-css-loader NPM version

You can use react-native-css-loader width react-native-webpack-server, which can use webpack to built react-native app better.

react-native-css-loader, inspired by gulp-react-native-stylesheet-css, thanks.

Installation

$ npm install react-native --save
$ npm install react-native-css-loader --save-dev

Usage

var styles = require("react-native-css!./file.css");
// => returns react-native stylesheet object

Or within the webpack config:

// only css:
module: {
  loaders: [{
    test: /\.css$/,
    loader: 'react-native-css-loader'
  }]
}

// use stylus:
module: {
  loaders: [{
    test: /\.styl$/,
    loader: 'react-native-css-loader!stylus-loader'
  }]
}

// use sass:
module: {
  loaders: [{
    test: /\.scss$/,
    loader: 'react-native-css-loader!sass-loader'
  }]
}

// use less:
module: {
  loaders: [{
    test: /\.less$/,
    loader: 'react-native-css-loader!less-loader'
  }]
}

API

check this file: index.js

Contributing

  • Fork this Repo first
  • Clone your Repo
  • Install dependencies by $ npm install
  • Checkout a feature branch
  • Feel free to add your features
  • Make sure your features are fully tested
  • Publish your local branch, Open a pull request
  • Enjoy hacking <3