Skip to content

Commit d3bc9e6

Browse files
committed
fix(bundles): add sideEffects false to package
1 parent 9396d81 commit d3bc9e6

File tree

5 files changed

+6
-1
lines changed

5 files changed

+6
-1
lines changed

scripts/bundles/internal-app-data.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export async function internalAppData(opts: BuildOptions) {
2020
main: 'index.cjs',
2121
module: 'index.js',
2222
types: 'index.d.ts',
23+
sideEffects: false
2324
});
2425

2526
const internalAppDataBundle: RollupOptions = {

scripts/bundles/internal-platform-client.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export async function internalClient(opts: BuildOptions) {
2626
name: '@stencil/core/internal/client',
2727
description: 'Stencil internal client platform to be imported by the Stencil Compiler and internal runtime. Breaking changes can and will happen at any time.',
2828
main: 'index.js',
29+
sideEffects: false,
2930
});
3031

3132
const internalClientBundle: RollupOptions = {

scripts/bundles/internal.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export async function internal(opts: BuildOptions) {
2727
description: 'Stencil internals only to be imported by the Stencil Compiler. Breaking changes can and will happen at any time.',
2828
main: 'index.js',
2929
types: 'index.d.ts',
30+
sideEffects: false,
3031
});
3132

3233
const clientPlatformBundle = await internalClient(opts);

scripts/bundles/mock-doc.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export async function mockDoc(opts: BuildOptions) {
2424
main: 'index.cjs',
2525
module: 'index.js',
2626
types: 'index.d.ts',
27+
sideEffects: false,
2728
});
2829

2930
const esOutput: OutputOptions = {

scripts/utils/write-pkg-json.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export function writePkgJson(opts: BuildOptions, pkgDir: string, pkgData: Packag
3535
fs.writeFileSync(path.join(pkgDir, 'package.json'), JSON.stringify(formatedPkg, null, 2) + '\n');
3636
}
3737

38-
const PROPS_ORDER = ['name', 'version', 'description', 'main', 'module', 'browser', 'types', 'exports', 'type', 'private'];
38+
const PROPS_ORDER = ['name', 'version', 'description', 'bin', 'main', 'module', 'browser', 'types', 'exports', 'type', 'files', 'private', 'sideEffects'];
3939

4040
export interface PackageData {
4141
name: string;
@@ -57,4 +57,5 @@ export interface PackageData {
5757
repository?: any;
5858
files?: string[];
5959
bin?: { [key: string]: string };
60+
sideEffects?: false;
6061
}

0 commit comments

Comments
 (0)