refactor: optimize component lifecycle and build process

- React: Removed unnecessary dependencies from useEffect in Artplayer component.
- Vue: Simplified instance emission in Artplayer component by removing nextTick.
- Build script: Added cpy to copy built i18n files to a new directory and set context to browser for Parcel.
This commit is contained in:
Harvey Zack committed 2025-08-17 17:25:16 +08:00
1 parent 0eed9c114b
commit 5cc6724f54
17 files changed
+25 -19

No files matched your search

+1 -1
View File
@@ -572,7 +572,7 @@ module.exports = ".art-video-player {\n --art-theme: red;\n --art-font-color:
});
},{}],"3r4tp":[function(require,module,exports,__globalThis) {
module.exports = JSON.parse("{\"name\":\"artplayer\",\"version\":\"5.2.6\",\"description\":\"ArtPlayer.js is a modern and full featured HTML5 video player\",\"author\":\"Harvey Zack <laozhaochaguan@gmail.com>\",\"license\":\"MIT\",\"homepage\":\"https://artplayer.org\",\"repository\":{\"type\":\"git\",\"url\":\"git+https://github.com/zhw2590582/ArtPlayer.git\"},\"bugs\":{\"url\":\"https://github.com/zhw2590582/ArtPlayer/issues\"},\"keywords\":[\"html5\",\"video\",\"player\"],\"main\":\"dist/artplayer.js\",\"legacy\":\"dist/artplayer.legacy.js\",\"types\":\"types/artplayer.d.ts\",\"browserslist\":\"last 1 Chrome version\",\"dependencies\":{\"option-validator\":\"^2.0.6\"}}");
module.exports = JSON.parse("{\"name\":\"artplayer\",\"version\":\"5.3.0\",\"description\":\"ArtPlayer.js is a modern and full featured HTML5 video player\",\"author\":\"Harvey Zack <laozhaochaguan@gmail.com>\",\"license\":\"MIT\",\"homepage\":\"https://artplayer.org\",\"repository\":{\"type\":\"git\",\"url\":\"git+https://github.com/zhw2590582/ArtPlayer.git\"},\"bugs\":{\"url\":\"https://github.com/zhw2590582/ArtPlayer/issues\"},\"keywords\":[\"html5\",\"video\",\"player\"],\"exports\":{\".\":{\"import\":\"./dist/artplayer.mjs\",\"require\":\"./dist/artplayer.js\"},\"./i18n/*\":{\"import\":\"./dist/i18n/*.mjs\",\"require\":\"./dist/i18n/*.js\"},\"./dist/i18n/*\":{\"import\":\"./dist/i18n/*.mjs\",\"require\":\"./dist/i18n/*.js\"}},\"main\":\"./dist/artplayer.js\",\"module\":\"./dist/artplayer.mjs\",\"types\":\"./types/artplayer.d.ts\",\"legacy\":\"./dist/artplayer.legacy.js\",\"browserslist\":\"last 1 Chrome version\",\"dependencies\":{\"option-validator\":\"^2.0.6\"}}");
},{}],"1dlGA":[function(require,module,exports,__globalThis) {
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");