mirror of
https://github.com/trezor/trezor-suite.git
synced 2026-03-03 05:55:03 +01:00
build(utils): buid for esm
This commit is contained in:
committed by
Carlos García Ortiz
parent
623f1289f3
commit
82b3c420ce
@@ -20,12 +20,15 @@
|
||||
"main": "src/index.ts",
|
||||
"files": [
|
||||
"lib/",
|
||||
"libESM",
|
||||
"!**/*.map"
|
||||
],
|
||||
"scripts": {
|
||||
"test:unit": "yarn g:jest --verbose -c ./jest.config.js",
|
||||
"type-check": "yarn g:tsc --build tsconfig.json",
|
||||
"build:lib": "yarn g:rimraf ./lib && yarn g:tsc --build tsconfig.lib.json && ../../scripts/replace-imports.sh ./lib",
|
||||
"build:lib": "yarn build:lib:cjs && yarn build:lib:esm",
|
||||
"build:lib:cjs": "yarn g:rimraf ./lib && yarn g:tsc --build tsconfig.lib.json && ../../scripts/replace-imports.sh ./lib",
|
||||
"build:lib:esm": "yarn g:rimraf ./libESM && yarn g:tsc --build tsconfig.libESM.json && ../../scripts/replace-imports.sh ./libESM libESM",
|
||||
"prepublishOnly": "yarn tsx ../../scripts/prepublishNPM.js",
|
||||
"prepublish": "yarn tsx ../../scripts/prepublish.js"
|
||||
},
|
||||
|
||||
8
packages/utils/tsconfig.libESM.json
Normal file
8
packages/utils/tsconfig.libESM.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "./tsconfig.lib.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "libESM",
|
||||
"module": "ESNext",
|
||||
"target": "esnext"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user