12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- import bundleSize from '@atomico/rollup-plugin-sizes'
- import { visualizer } from 'rollup-plugin-visualizer'
- import license from 'rollup-plugin-license'
- import esbuild from 'rollup-plugin-esbuild'
- // import dts from "rollup-plugin-dts";
- import pkg from "./package.json" assert { type: "json" }
- import typescript from "@rollup/plugin-typescript";
- const sharedOutput = {
- name: '@tabler/icons-vue',
- sourcemap: true,
- globals: {
- vue: 'vue',
- }
- }
- const sharedPlugins = [
- license({
- banner: `${pkg.name} v${pkg.version} - ${pkg.license}`
- }),
- bundleSize(),
- visualizer({
- sourcemap: false,
- filename: `stats/${pkg.name}.html`
- }),
- typescript({ tsconfig: "./tsconfig.json" })
- ]
- export default [
- {
- input: "src/index.ts",
- output: [
- {
- ...sharedOutput,
- file: pkg.main,
- format: "cjs",
- },
- {
- ...sharedOutput,
- file: pkg.module,
- format: "esm",
- },
- {
- file: pkg['main:es'],
- format: "es",
- ...sharedOutput,
- },
- {
- file: pkg['main:umd'],
- format: "umd",
- ...sharedOutput,
- }
- ],
- plugins: [
- ...sharedPlugins,
- esbuild()
- ]
- },
- {
- input: "src/index.ts",
- output: [
- {
- ...sharedOutput,
- file: pkg['main:umd:min'],
- format: 'umd',
- },
- ],
- plugins: [
- ...sharedPlugins,
- esbuild({
- minify: true
- })
- ]
- },
- // {
- // input: "dist/esm/types/index.d.ts",
- // output: [
- // {
- // file: "dist/index.d.ts",
- // format: "esm"
- // }
- // ],
- // plugins: [
- // dts()
- // ]
- // },
- ];
|