Skip to content

Commit

Permalink
[CM-1203] Drop mjs-entry plugin (#360)
Browse files Browse the repository at this point in the history
  • Loading branch information
mschuwalow committed Mar 22, 2024
1 parent c150a66 commit ff1f8c2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 16 deletions.
8 changes: 0 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@
"node": ">=18"
},
"main": "./dist/index.cjs",
"module": "./dist/index.cjs.mjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"type": "module",
"exports": {
".": {
"types": "./dist/index.d.ts",
"require": "./dist/index.cjs",
"import": "./dist/index.cjs.mjs"
"import": "./dist/index.mjs"
},
"./internal": {
"types": "./dist/internal.d.ts",
"require": "./dist/internal.cjs",
"import": "./dist/internal.cjs.mjs"
"import": "./dist/internal.mjs"
},
"./package.json": "./package.json"
},
Expand Down Expand Up @@ -108,8 +108,6 @@
"rollup-plugin-cleaner": "^1.0.0",
"rollup-plugin-delete": "^2.0.0",
"rollup-plugin-dts": "^6.0.1",
"rollup-plugin-mjs-entry": "^0.1.1",
"serialize-javascript": ">=6.0.1",
"sinon": "^17.0.0",
"sinon-chai": "^3.7.0",
"tiny-uuid4": "^1.0.1",
Expand Down
11 changes: 8 additions & 3 deletions rollup/dist.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import ts from '@rollup/plugin-typescript'
import cleaner from 'rollup-plugin-cleaner'
import dts from 'rollup-plugin-dts'
import del from "rollup-plugin-delete";
import mjsEntry from 'rollup-plugin-mjs-entry'

const OUTPUT_DIR = './dist'
const DECLARATION_DIR = `${OUTPUT_DIR}/dts`
Expand All @@ -18,13 +17,19 @@ export default [
chunkFileNames: '[name]-[hash].cjs',
format: 'cjs',
sourcemap: false
},
{
dir: OUTPUT_DIR,
entryFileNames: '[name].mjs',
chunkFileNames: '[name]-[hash].mjs',
format: 'es',
sourcemap: false
}
],
plugins: [
cleaner({ targets: [OUTPUT_DIR] }),
ts({ compilerOptions: { declarationDir: DECLARATION_DIR } }),
strip(),
mjsEntry() // https://nodejs.org/api/packages.html#packages_dual_commonjs_es_module_packages
strip()
],
external: [
'live-connect-common',
Expand Down

0 comments on commit ff1f8c2

Please sign in to comment.