Skip to content

Commit 9ee7b6d

Browse files
authored
remove prebuilt bundle entrypoints from the package (#125)
1 parent 881acd5 commit 9ee7b6d

3 files changed

Lines changed: 7 additions & 38 deletions

File tree

.changeset/big-rats-occur.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"unicode-segmenter": minor
3+
---
4+
5+
Remove pre-built bundled entrypoints from the package

package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@
7878
"import": "./intl-polyfill.js",
7979
"require": "./intl-polyfill.cjs"
8080
},
81-
"./bundle/*": "./bundle/*.js",
8281
"./package.json": "./package.json"
8382
}
8483
},
@@ -87,12 +86,11 @@
8786
"/*.cjs",
8887
"/*.d.ts",
8988
"/*.d.cts",
90-
"/licenses",
91-
"/bundle"
89+
"/licenses"
9290
],
9391
"scripts": {
9492
"prepack": "yarn clean && yarn build",
95-
"clean": "rimraf -g \"*.js\" \"*.cjs\" \"*.map\" \"*.d.ts\" \"*.d.cts\" \"bundle\"",
93+
"clean": "rimraf -g \"*.js\" \"*.cjs\" \"*.map\" \"*.d.ts\" \"*.d.cts\"",
9694
"build": "node scripts/build-exports.js",
9795
"test": "node --test --test-reporter spec --test-reporter-destination=stdout",
9896
"test:coverage": "yarn test --experimental-test-coverage --test-reporter=lcov --test-reporter-destination=lcov.info",

scripts/build-exports.js

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -73,40 +73,6 @@ function rewriteCjs(content) {
7373
// );
7474
}
7575

76-
{
77-
console.log('Build browser bundles...');
78-
79-
let bundleEntryPoints = [
80-
src('index.js'),
81-
src('emoji.js'),
82-
src('general.js'),
83-
src('grapheme.js'),
84-
src('intl-adapter.js'),
85-
src('intl-polyfill.js'),
86-
];
87-
await build({
88-
bundle: true,
89-
entryPoints: bundleEntryPoints,
90-
outdir: bundleDir,
91-
outExtension: { '.js': '.js' },
92-
format: 'esm',
93-
treeShaking: true,
94-
write: true,
95-
sourcemap: false,
96-
});
97-
await build({
98-
bundle: true,
99-
entryPoints: bundleEntryPoints,
100-
outdir: bundleDir,
101-
outExtension: { '.js': '.min.js' },
102-
format: 'esm',
103-
minify: true,
104-
treeShaking: true,
105-
write: true,
106-
sourcemap: false,
107-
});
108-
}
109-
11076
if (!process.argv.includes('--no-tsc')) {
11177
console.log('Building type declarations...');
11278
const { promise, resolve, reject } = Promise.withResolvers();

0 commit comments

Comments
 (0)