打包为大文件

master
宇天 2021-08-09 17:00:02 +08:00
parent dec149ef0f
commit e010b98c53
5 changed files with 22 additions and 6 deletions

15
build.js Normal file
View File

@ -0,0 +1,15 @@
/**
* {build}
* @author yutent<yutent.io@gmail.com>
* @date 2021/08/09 11:59:41
*/
const Es = require('esbuild')
Es.build({
entryPoints: ['src/index.js', 'src/next.js'],
bundle: true,
minify: true,
format: 'esm',
outdir: 'dist'
})

View File

@ -1,13 +1,11 @@
{
"name": "@bytedo/fetch",
"version": "1.1.1",
"version": "1.1.2",
"description": "全新的ajax封装。分2个版本, 一个基于XMLHttpRequest, 一个基于window.fetch",
"main": "dist/index.js",
"directories": {
"lib": "dist/lib"
},
"files": ["dist/*"],
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"start": "node ./build.js"
},
"repository": {
"type": "git",
@ -19,5 +17,8 @@
"bugs": {
"url": "https://github.com/bytedo/fetch/issues"
},
"homepage": "https://github.com/bytedo/fetch#readme"
"homepage": "https://github.com/bytedo/fetch#readme",
"devDependencies": {
"esbuild": "^0.12.19"
}
}