Skip to content

Commit d4ae948

Browse files
committed
chore: build 1.0.12 - ESM bundle, player.js CDN, changelog, gitignore
Made-with: Cursor
1 parent c690dce commit d4ae948

File tree

4 files changed

+30
-8
lines changed

4 files changed

+30
-8
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ node_modules
22
dist
33
/.cache
44
**/.DS_Store
5-
/test
5+
/test
6+
7+
my-react-app

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [1.0.12]
6+
7+
### Changed
8+
9+
- **Build & package** – ESM build is now a single bundled file (`dist/player.esm.js`), so `import '@fastpix/fp-player'` works in React, Vite, and other bundlers without "Could not resolve ./utils/..." errors. CDN build stays at `dist/player.js` for backward compatibility with existing script-tag and CDN URLs.
10+
- **Exports**`"import"` resolves to `player.esm.js`; `"require"` and `main` resolve to `player.js` (IIFE).
11+
- **Build size** – Stripped legal comments and debugger statements in both builds for slightly smaller output.
12+
13+
514
## [1.0.11]
615

716
### Features you can use

package-lock.json

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
{
22
"name": "@fastpix/fp-player",
3-
"version": "1.0.11",
3+
"version": "1.0.12",
44
"description": "FastPix Player SDK is a customizable video player for on-demand and live streaming.",
55
"type": "module",
6-
"main": "./dist/player.cdn.js",
7-
"module": "./dist/player.js",
6+
"main": "./dist/player.js",
7+
"module": "./dist/player.esm.js",
88
"exports": {
99
".": {
10-
"import": "./dist/player.js",
11-
"require": "./dist/player.cdn.js"
10+
"import": "./dist/player.esm.js",
11+
"require": "./dist/player.js"
1212
}
1313
},
1414
"files": [
1515
"dist/*"
1616
],
1717
"scripts": {
1818
"format": "prettier --write \"src/**/*.ts\"",
19-
"build:esm": "esbuild src/player.ts --format=esm --target=es2019 --outdir=dist --minify",
20-
"build:cdn": "esbuild src/player.ts --bundle --minify --format=iife --global-name=FastPixPlayer --target=es2019 --outfile=dist/player.cdn.js",
19+
"build:esm": "esbuild src/player.ts --format=esm --target=es2019 --bundle --minify --legal-comments=none --drop:debugger --outfile=dist/player.esm.js",
20+
"build:cdn": "esbuild src/player.ts --format=iife --global-name=FastPixPlayer --target=es2019 --bundle --minify --legal-comments=none --drop:debugger --outfile=dist/player.js",
2121
"build": "npm run format && npm run build:esm && npm run build:cdn",
2222
"format:css": "prettier --write \"src/utils/innerHtml.ts\""
2323
},

0 commit comments

Comments
 (0)