|
98 | 98 | "@babel/preset-env": "^7.0.0",
|
99 | 99 | "@babel/preset-react": "^7.0.0",
|
100 | 100 | "@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", |
105 | 101 | "@testing-library/react": "^12.0.0",
|
106 | 102 | "@types/jest": "^26.0.0",
|
107 | 103 | "@types/react": "^17.0.0",
|
108 | 104 | "@types/react-dom": "^17.0.0",
|
109 | 105 | "@types/react-is": "^17.0.0",
|
110 | 106 | "@types/react-test-renderer": "^17.0.0",
|
111 | 107 | "babel-plugin-transform-react-remove-prop-types": "^0.4.24",
|
| 108 | + "esbuild": "^0.12.0", |
112 | 109 | "eslint-config-xo-react": "^0.25.0",
|
113 | 110 | "eslint-plugin-es": "^4.0.0",
|
114 | 111 | "eslint-plugin-react": "^7.0.0",
|
|
128 | 125 | "remark-preset-wooorm": "^8.0.0",
|
129 | 126 | "remark-toc": "^7.0.0",
|
130 | 127 | "rimraf": "^3.0.0",
|
131 |
| - "rollup": "^2.0.0", |
132 |
| - "rollup-plugin-node-polyfills": "^0.2.0", |
133 |
| - "rollup-plugin-terser": "^7.0.0", |
134 | 128 | "type-coverage": "^2.0.0",
|
135 | 129 | "typescript": "^4.0.0",
|
136 |
| - "uglify-js": "^3.0.0", |
137 | 130 | "xo": "^0.38.0"
|
138 | 131 | },
|
139 | 132 | "scripts": {
|
140 | 133 | "prepack": "npm run build && npm run format",
|
141 | 134 | "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;})));\"", |
144 | 136 | "build": "run-s build:*",
|
145 | 137 | "format": "remark . -qfo --ignore-pattern test/ && prettier . -w --loglevel warn && xo --fix",
|
146 | 138 | "test": "run-s build format test:*",
|
|
0 commit comments