当我尝试使用rollup-plugin-vue构建库时,我得到了太多的样式标签,每个vue组件一个。
有什么办法可以将这些标签合并到一起?
我的rollup.config.js
:
import external from 'rollup-plugin-peer-deps-external'
import commonjs from 'rollup-plugin-commonjs'
import postcss from 'rollup-plugin-postcss'
import url from 'rollup-plugin-url'
import resolve from 'rollup-plugin-node-resolve'
import vue from 'rollup-plugin-vue'
import config from './package.json'
export default {
input: config.input,
output: [
{
file: config.main,
format: 'cjs',
sourcemap: true
},
{
file: config.module,
format: 'es',
sourcemap: true
}
],
plugins: [
external(),
vue(),
postcss(),
url(),
resolve(),
commonjs()
]
}