Skip to content

Commit

Permalink
chore(runtime): set exports field in client runtime package.json (#5842)
Browse files Browse the repository at this point in the history
* chore(runtime): set exports field in client runtime package.json

* fix package.json

* prettier

* extend export

* extend export
  • Loading branch information
christian-bromann authored Jun 21, 2024
1 parent c837063 commit a2fa93b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
28 changes: 28 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,34 @@
"sys/",
"testing/"
],
"exports": {
".": {
"import": "./internal/stencil-core/index.js",
"require": "./internal/stencil-core/index.cjs"
},
"./internal": {
"import": "./internal/index.js"
},
"./internal/client": {
"import": "./internal/client/index.js"
},
"./internal/testing": {
"import": "./internal/testing/index.js"
},
"./internal/testing/*": {
"import": "./internal/testing/*"
},
"./internal/app-data": {
"import": "./internal/app-data/index.js",
"require": "./internal/app-data/index.cjs"
},
"./compiler": {
"import": "./compiler/stencil.js"
},
"./compiler/*": {
"import": "./compiler/*"
}
},
"scripts": {
"build": "npm run clean && npm run tsc.prod && npm run ts scripts/index.ts -- --prod --ci",
"build.watch": "npm run build -- --watch",
Expand Down
4 changes: 3 additions & 1 deletion scripts/esbuild/internal-platform-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ export async function getInternalClientBundles(opts: BuildOptions): Promise<ESBu
name: '@stencil/core/internal/client',
description:
'Stencil internal client platform to be imported by the Stencil Compiler and internal runtime. Breaking changes can and will happen at any time.',
main: 'index.js',
exports: './index.js',
main: './index.js',
type: 'module',
sideEffects: false,
});

Expand Down

0 comments on commit a2fa93b

Please sign in to comment.