Add umd output and update browser apps

This commit is contained in:
Jerome Wu
2022-09-23 18:16:34 +08:00
parent edb05a6572
commit c38ab7551b
11 changed files with 1377 additions and 32 deletions

View File

@@ -13,7 +13,7 @@
},
"scripts": {
"dev": "tsc -p tsconfig-esm.json --watch",
"build": "rimraf dist && tsc -p tsconfig-esm.json && tsc -p tsconfig-cjs.json",
"build": "rimraf dist && tsc -p tsconfig-esm.json && tsc -p tsconfig-cjs.json && webpack",
"lint": "eslint src"
},
"files": [
@@ -46,6 +46,7 @@
"@typescript-eslint/parser": "^5.37.0",
"eslint": "^8.23.1",
"rimraf": "^3.0.2",
"typescript": "^4.8.3"
"typescript": "^4.8.3",
"webpack-cli": "^4.10.0"
}
}

View File

@@ -0,0 +1,12 @@
const path = require("path");
module.exports = {
mode: "production",
entry: "./dist/cjs/index.js",
output: {
library: "FFmpegUtil",
libraryTarget: "umd",
filename: "index.js",
path: path.resolve(__dirname, "dist", "umd"),
},
};