mirror of
https://github.com/oceanprotocol/react.git
synced 2025-02-05 00:27:25 +01:00
use microbundle for release bundle generation
This commit is contained in:
parent
12c38b235f
commit
b0c56583e5
@ -153,10 +153,11 @@ npm run format
|
||||
|
||||
## 🛳 Production
|
||||
|
||||
The build script will compile `src/` with `tsc` into:
|
||||
The build script will compile `src/` with [`microbundle`](https://github.com/developit/microbundle) into:
|
||||
|
||||
1. CommonJS module with ES5 syntax
|
||||
2. ES module with ES6 syntax
|
||||
1. CommonJS module
|
||||
2. ES module
|
||||
3. UMD build
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
|
3478
package-lock.json
generated
3478
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
16
package.json
16
package.json
@ -2,16 +2,15 @@
|
||||
"name": "@oceanprotocol/react",
|
||||
"version": "0.0.17",
|
||||
"description": "React hooks & components on top of squid.js",
|
||||
"main": "dist/cjs/index.js",
|
||||
"module": "dist/esm/index.js",
|
||||
"react-native": "dist/esm/index.js",
|
||||
"main": "dist/index.js",
|
||||
"umd:main": "dist/index.umd.js",
|
||||
"module": "dist/index.esm.js",
|
||||
"esmodule": "dist/index.modern.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"scripts": {
|
||||
"start": "tsc --watch",
|
||||
"start": "microbundle watch --no-compress --jsx React.createElement",
|
||||
"start-example": "cd example && npm start",
|
||||
"watch": "tsc --watch",
|
||||
"build": "rm -rf dist && npm run build:cjs && npm run build:esm",
|
||||
"build:cjs": "tsc",
|
||||
"build:esm": "tsc --module esNext --outDir dist/esm",
|
||||
"build": "rm -rf dist && microbundle build --no-compress --jsx React.createElement",
|
||||
"test": "npm run lint && npm run type-check",
|
||||
"lint": "eslint --ignore-path .eslintignore --ext .js --ext .ts --ext .tsx .",
|
||||
"format": "prettier --ignore-path .gitignore './**/*.{css,yml,js,ts,tsx,json}' --write",
|
||||
@ -45,6 +44,7 @@
|
||||
"eslint-config-prettier": "^6.11.0",
|
||||
"eslint-plugin-prettier": "^3.1.4",
|
||||
"eslint-plugin-react": "^7.20.3",
|
||||
"microbundle": "^0.12.3",
|
||||
"prettier": "^2.0.5",
|
||||
"release-it": "^13.6.4",
|
||||
"typescript": "^3.9.7"
|
||||
|
@ -2,10 +2,11 @@
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"moduleResolution": "node",
|
||||
"target": "es5",
|
||||
"lib": ["esnext", "dom"],
|
||||
"outDir": "dist/cjs",
|
||||
"target": "es6",
|
||||
"lib": ["dom", "dom.iterable", "es2017"],
|
||||
"outDir": "dist",
|
||||
"jsx": "react",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"esModuleInterop": true,
|
||||
"sourceMap": true,
|
||||
"declaration": true,
|
||||
|
Loading…
Reference in New Issue
Block a user