Skip to content

Commit

Permalink
feat(vue): remove commonjs (#1328)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielleroux authored Jun 14, 2024
1 parent 23307a0 commit c17750d
Show file tree
Hide file tree
Showing 4 changed files with 341 additions and 119 deletions.
5 changes: 5 additions & 0 deletions .changeset/rare-numbers-double.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@siemens/ix-vue": major
---

feat(vue): remove commonjs
22 changes: 9 additions & 13 deletions packages/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,38 +11,34 @@
"url": "https://github.com/siemens/ix",
"directory": "packages/vue"
},
"module": "dist/index.js",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"LICENSE",
"README.md",
"dist"
],
"exports": {
".": {
"import": "./dist/index.js"
}
},
"scripts": {
"build": "pnpm clean && pnpm compile",
"compile": "pnpm tsc",
"build": "pnpm clean && rollup --config rollup.config.mjs",
"clean": "rimraf dist",
"lint": "eslint src"
},
"dependencies": {
"@siemens/ix": "~2.2.1"
},
"devDependencies": {
"rimraf": "^3.0.2",
"vue": "^3.2.45",
"@rollup/plugin-typescript": "^8.4.0",
"@typescript-eslint/eslint-plugin": "^5.45.0",
"@typescript-eslint/parser": "^5.45.0",
"eslint-config-ix": "workspace:*",
"eslint-plugin-vue": "^9.9.0"
"eslint-plugin-vue": "^9.9.0",
"rimraf": "^3.0.2",
"rollup": "^4.18.0",
"typescript": "^5.4.5",
"vue": "^3.2.45"
},
"peerDependencies": {
"vue": ">=3.2.45",
"@siemens/ix-icons": "^2.0.0"
"@siemens/ix-icons": "^2.0.0",
"vue": ">=3.2.45"
}
}
20 changes: 20 additions & 0 deletions packages/vue/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import typescript from '@rollup/plugin-typescript';
const external = ['vue'];

export default {
input: 'src/index.ts',
output: [
{
dir: 'dist/',
entryFileNames: '[name].js',
chunkFileNames: '[name]-[hash].js',
format: 'es',
sourcemap: true,
},
],
plugins: [typescript()],
external: (id) =>
external.includes(id) ||
id.startsWith('@siemens/ix') ||
id.startsWith('@siemens/ix-icons'),
};
Loading

0 comments on commit c17750d

Please sign in to comment.