Skip to content

Commit

Permalink
💚 bundle with esbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
JiangWeixian committed Jul 15, 2023
1 parent 5215545 commit e7bfa87
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 55 deletions.
19 changes: 8 additions & 11 deletions packages/mario/package.json
@@ -1,12 +1,16 @@
{
"name": "@aiou/mario",
"version": "0.2.1",
"type": "module",
"description": "generator of neo",
"keywords": [
"neo",
"generator"
],
"license": "MIT",
"engines": {
"node": ">=12"
},
"homepage": "https://github.com/neo-hack/neo#readme",
"repository": {
"type": "git",
Expand All @@ -22,27 +26,19 @@
"email": "jiangweixian1994@gmail.com",
"url": "https://twitter.com/jiangweixian"
},
"engines": {
"node": ">=12"
},
"type": "module",
"files": ["lib"],
"exports": {
".": "./lib/index.mjs",
"./helpers": "./lib/utils/helpers.mjs"
},
"typesVersions": {
"*": {
"helpers": [
"lib/utils/helpers.d.ts"
]
"helpers": ["lib/utils/helpers.d.ts"]
}
},
"main": "lib/index.mjs",
"module": "lib/index.mjs",
"typings": "lib/index.d.ts",
"files": [
"lib"
],
"scripts": {
"schema2types": "json2ts --input ./assets/github.json --output ./assets/github.d.ts",
"build": "rimraf lib && rollup -c --silent",
Expand Down Expand Up @@ -84,6 +80,7 @@
"@types/gulp-plumber": "^0.0.33",
"@types/gulp-rename": "^2.0.1",
"@types/lodash-es": "^4.17.5",
"esbuild": "^0.18.13",
"esno": "^0.13.0",
"esrua": "0.2.1",
"execa": "^6.0.0",
Expand All @@ -92,10 +89,10 @@
"listr": "^0.14.3",
"rimraf": "3.0.2",
"rollup": "2.58.0",
"rollup-plugin-esbuild": "^5.0.0",
"rollup-plugin-multi-input": "^1.3.1",
"rollup-plugin-node-externals": "^5.0.0",
"rollup-plugin-size": "^0.2.2",
"rollup-plugin-typescript2": "0.30.0",
"tslib": "2.3.0",
"typescript": "^4.5.4",
"vitest": "^0.7.7",
Expand Down
8 changes: 4 additions & 4 deletions packages/mario/rollup.config.js
@@ -1,9 +1,9 @@
import { nodeResolve } from '@rollup/plugin-node-resolve'
import { defineConfig } from 'rollup'
import esbuild from 'rollup-plugin-esbuild'
import multiple from 'rollup-plugin-multi-input'
import { externals } from 'rollup-plugin-node-externals'
import bundleSize from 'rollup-plugin-size'
import typescript from 'rollup-plugin-typescript2'

export default defineConfig([
// CommonJS (for Node) and ES module (for bundlers) build.
Expand All @@ -19,9 +19,9 @@ export default defineConfig([
devDeps: false,
}),
multiple(),
typescript({
check: false,
tsconfig: './tsconfig.build.json',
esbuild({
target: 'es2020',
minify: false,
}), // so Rollup can convert TypeScript to JavaScript
nodeResolve({ preferBuiltins: true }),
bundleSize(),
Expand Down
72 changes: 32 additions & 40 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e7bfa87

Please sign in to comment.