babel-plugin-transform-css-import-to-string

2019-04-15 admin

babel-plugin-transform-css-import-to-string是什么

什么是babel-plugin-transform-css-import-to-string,Turn CSS imports into strings

  • babel-plugin-transform-css-import-to-string官网:官网
  • babel-plugin-transform-css-import-to-string源码仓库:源码仓库
  • babel-plugin-transform-css-import-to-string下载地址:点此下载 点此下载2

babel-plugin-transform-css-import-to-string使用教程帮助文档

babel-plugin-transform-css-import-to-string

Turn CSS imports into strings.

Example

Given the following style.css.

body { background-color: red; }

in

import css from './style.css';

out

var css = 'body{background-color:red;}';

Installation

$ npm install babel-plugin-transform-css-import-to-string

Usage

Via .babelrc (Recommended)

.babelrc

{
  "plugins": ["transform-css-import-to-string"]
}

Via CLI

$ babel --plugins transform-css-import-to-string script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["transform-css-import-to-string"]
});

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-61813.html

文章标题:babel-plugin-transform-css-import-to-string

回到顶部