Skip to content

Commit

Permalink
fix(bundles): add sideEffects false to package
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdbradley committed Jan 12, 2021
1 parent 9396d81 commit d3bc9e6
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions scripts/bundles/internal-app-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export async function internalAppData(opts: BuildOptions) {
main: 'index.cjs',
module: 'index.js',
types: 'index.d.ts',
sideEffects: false
});

const internalAppDataBundle: RollupOptions = {
Expand Down
1 change: 1 addition & 0 deletions scripts/bundles/internal-platform-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export async function internalClient(opts: BuildOptions) {
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',
sideEffects: false,
});

const internalClientBundle: RollupOptions = {
Expand Down
1 change: 1 addition & 0 deletions scripts/bundles/internal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export async function internal(opts: BuildOptions) {
description: 'Stencil internals only to be imported by the Stencil Compiler. Breaking changes can and will happen at any time.',
main: 'index.js',
types: 'index.d.ts',
sideEffects: false,
});

const clientPlatformBundle = await internalClient(opts);
Expand Down
1 change: 1 addition & 0 deletions scripts/bundles/mock-doc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export async function mockDoc(opts: BuildOptions) {
main: 'index.cjs',
module: 'index.js',
types: 'index.d.ts',
sideEffects: false,
});

const esOutput: OutputOptions = {
Expand Down
3 changes: 2 additions & 1 deletion scripts/utils/write-pkg-json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function writePkgJson(opts: BuildOptions, pkgDir: string, pkgData: Packag
fs.writeFileSync(path.join(pkgDir, 'package.json'), JSON.stringify(formatedPkg, null, 2) + '\n');
}

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

export interface PackageData {
name: string;
Expand All @@ -57,4 +57,5 @@ export interface PackageData {
repository?: any;
files?: string[];
bin?: { [key: string]: string };
sideEffects?: false;
}

0 comments on commit d3bc9e6

Please sign in to comment.