diff --git a/packages/svelte/build.sh b/packages/svelte/build.sh index 636156dc47..c126f38177 100644 --- a/packages/svelte/build.sh +++ b/packages/svelte/build.sh @@ -3,15 +3,13 @@ set -e rm -rf dist +mkdir dist echo "linking local packages (non-lerna)" # we run this outside of lerna, since lerna seems to have issues with correctly linking to the dist rm -f node_modules/@carbon/charts ln -sf $(pwd)/../core/dist node_modules/@carbon/charts -echo "bundling..." -rollup -c - # copy src directory for Svelte entry cp -r src/ dist/src diff --git a/packages/svelte/package.json b/packages/svelte/package.json index 2d8c32dc9a..cce892953d 100644 --- a/packages/svelte/package.json +++ b/packages/svelte/package.json @@ -2,8 +2,8 @@ "name": "@carbon/charts-svelte", "version": "0.54.0", "description": "Carbon charting components for Svelte", - "main": "./bundle.js", - "module": "./index.js", + "type": "module", + "main": "./src/index.js", "svelte": "./src/index.js", "types": "./types/index.d.ts", "scripts": { diff --git a/packages/svelte/rollup.config.js b/packages/svelte/rollup.config.js deleted file mode 100644 index a67134697e..0000000000 --- a/packages/svelte/rollup.config.js +++ /dev/null @@ -1,35 +0,0 @@ -import { terser } from "rollup-plugin-terser"; -import resolve from "rollup-plugin-node-resolve"; -import svelte from "rollup-plugin-svelte"; - -export default [ - { - input: "./src/index.js", - output: { - file: "./dist/bundle.js", - format: "umd", - name: "ChartsSvelte", - globals: { - "@carbon/charts": "Charts" - } - }, - plugins: [ - svelte(), - resolve(), - terser() - ], - external: ["svelte", "@carbon/charts"] - }, - { - input: "./src/index.js", - output: { - file: "./dist/index.js", - format: "es" - }, - plugins: [ - svelte(), - resolve() - ], - external: ["svelte", "@carbon/charts"] - } -];