Skip to content

Commit

Permalink
Specify Modules with Potential for Side Effects
Browse files Browse the repository at this point in the history
  • Loading branch information
sinclairzx81 committed Sep 12, 2024
1 parent d387b2a commit 0f03e27
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions task/build/package/create-package-json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,19 @@ function resolveMetadata() {
repository: packageJson.repository,
// flagged by socket.dev if not present
scripts: { test: 'echo test' },
// disable auto bundle strategy: see https://github.com/esm-dev/esm.sh#bundling-strategy
'esm.sh': { 'bundle': false },
types: "./build/cjs/index.d.ts",
main: "./build/cjs/index.js",
module: "./build/esm/index.mjs"
module: "./build/esm/index.mjs",
// disable auto bundle strategy: see https://github.com/esm-dev/esm.sh#bundling-strategy
'esm.sh': { 'bundle': false },
// specify modules with potential for side effects
'sideEffects': [
"./build/esm/type/registry/format.mjs",
"./build/esm/type/registry/type.mjs",
"./build/esm/type/system/policy.mjs",
"./build/cjs/type/registry/format.js",
"./build/cjs/type/registry/type.js",
"./build/cjs/type/system/policy.js"
]
}
}

0 comments on commit 0f03e27

Please sign in to comment.