Skip to content

Commit 8c572df

Browse files
committed
Replace rollup with esbuild
1 parent 5bc39ed commit 8c572df

File tree

2 files changed

+2
-57
lines changed

2 files changed

+2
-57
lines changed

package.json

+2-10
Original file line numberDiff line numberDiff line change
@@ -98,17 +98,14 @@
9898
"@babel/preset-env": "^7.0.0",
9999
"@babel/preset-react": "^7.0.0",
100100
"@matejmazur/react-katex": "^3.0.0",
101-
"@rollup/plugin-babel": "^5.0.0",
102-
"@rollup/plugin-commonjs": "^19.0.0",
103-
"@rollup/plugin-json": "^4.0.0",
104-
"@rollup/plugin-node-resolve": "^13.0.0",
105101
"@testing-library/react": "^12.0.0",
106102
"@types/jest": "^26.0.0",
107103
"@types/react": "^17.0.0",
108104
"@types/react-dom": "^17.0.0",
109105
"@types/react-is": "^17.0.0",
110106
"@types/react-test-renderer": "^17.0.0",
111107
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
108+
"esbuild": "^0.12.0",
112109
"eslint-config-xo-react": "^0.25.0",
113110
"eslint-plugin-es": "^4.0.0",
114111
"eslint-plugin-react": "^7.0.0",
@@ -128,19 +125,14 @@
128125
"remark-preset-wooorm": "^8.0.0",
129126
"remark-toc": "^7.0.0",
130127
"rimraf": "^3.0.0",
131-
"rollup": "^2.0.0",
132-
"rollup-plugin-node-polyfills": "^0.2.0",
133-
"rollup-plugin-terser": "^7.0.0",
134128
"type-coverage": "^2.0.0",
135129
"typescript": "^4.0.0",
136-
"uglify-js": "^3.0.0",
137130
"xo": "^0.38.0"
138131
},
139132
"scripts": {
140133
"prepack": "npm run build && npm run format",
141134
"build:ts": "rimraf \"{src/**,test/**,}.d.ts\" && tsc && type-coverage",
142-
"build:umd": "rollup --silent -c",
143-
"build:umdcheck": "printf 'ES5? ' && uglifyjs react-markdown.min.js > /dev/null && echo 'Yes'",
135+
"build:umd": "esbuild src/react-markdown.js --bundle --minify --target=es2015 --outfile=react-markdown.min.js --global-name=ReactMarkdown --banner:js=\"(function (g, f) {typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = f() : typeof define === 'function' && define.amd ? define([], f) : (g = typeof globalThis !== 'undefined' ? globalThis : g || self, g.ReactMarkdown = f()); }(this, (function () { 'use strict';\" --footer:js=\"return ReactMarkdown;})));\"",
144136
"build": "run-s build:*",
145137
"format": "remark . -qfo --ignore-pattern test/ && prettier . -w --loglevel warn && xo --fix",
146138
"test": "run-s build format test:*",

rollup.config.js

-47
This file was deleted.

0 commit comments

Comments
 (0)