UNPKG
zhb-react-npm
Version:
latest (1.0.2)
1.0.2
1.0.1
1.0.0
react自定义测试第三版
zhb-react-npm
/
rollup.config.js
11 lines
(10 loc)
•
392 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
const
babel
=
require(
"rollup-plugin-babel"
);
module
.
exports
= { input:
"./src/index.js"
,
//入口文件路径
output: { file:
"./lib/bundle.js"
,
//出口文件
format:
"cjs"
,
//输出的语法格式(格式详情见官网)
}, plugins: [babel()],
//转码
external: [
"react"
,
"styled-components"
],
//去除警告 如果要用styled-components插件的话添加进来
};