Files
vueecharts/tsdown.config.ts
Yue JIN 8ed975e09b feat!: inject style via constructable CSSStyleSheet and remove CSP entry (#847)
* chore: not inject inline css on server

* feat!: remove csp entry

* keep csp title in readme

* chore: switch to rolldown and tsdown

* update

* dedupe

* update according to review

* emphasize "both" in csp section

* load css with unplugin-raw

* change tsdown entry
2025-08-10 23:26:17 +08:00

33 lines
672 B
TypeScript

import { defineConfig } from "tsdown";
import raw from "unplugin-raw/rollup";
export default defineConfig([
{
entry: "src/index.ts",
platform: "browser",
sourcemap: true,
copy: ["src/style.css"],
plugins: [raw()],
},
{
entry: "src/global.ts",
outputOptions: {
file: "dist/index.min.js", // for unpkg/jsdelivr
dir: undefined,
format: "umd",
name: "VueECharts",
exports: "default",
globals: {
vue: "Vue",
echarts: "echarts",
"echarts/core": "echarts",
},
},
platform: "browser",
sourcemap: true,
minify: true,
dts: false,
plugins: [raw()],
},
]);