Skip to content

Commit

Permalink
Broaden library compatibility by transpiling Stellar dependencies (#837)
Browse files Browse the repository at this point in the history
* Add babel transpiling to es6 dependencies
* Don't use tsc to compile, just check
  • Loading branch information
Shaptic committed Jul 11, 2023
1 parent 52947e8 commit bb7f443
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
12 changes: 4 additions & 8 deletions .babelrc → babel.config.json
@@ -1,24 +1,20 @@
{
"comments": false,
"comments": true, // for debugging & jsdocs
"presets": [
"@babel/preset-env",
"@babel/typescript"
],
"targets": {
"node": 14,
"browsers": [ "> 2%" ]
"browsers": [ "> 2%" ] // target modern browsers and ES6
},
"env": {
"development": {
"comments": true, // for debugging
"plugins": [ "istanbul" ] // for code coverage
},
"docs": {
"comments": true // for jsdocs
},
"production": {
// stricter target for final browser bundle
"comments": false,
"targets": {
"node": 14,
"browsers": [
"> 2%",
"ie 11",
Expand Down
5 changes: 4 additions & 1 deletion config/tsconfig.json
Expand Up @@ -2,11 +2,14 @@
"extends": "@stellar/tsconfig",
"compilerOptions": {
"declaration": true,
"emitDeclarationOnly": true,
"declarationDir": "../lib",
"removeComments": false,
"lib": ["ES6"],
"moduleResolution": "node",
"rootDir": "../src",
"outDir": "../lib",
"target": "es6"
},
"include": ["../src"]
}
}
2 changes: 1 addition & 1 deletion config/webpack.config.browser.js
Expand Up @@ -32,7 +32,7 @@ const config = {
rules: [
{
test: /\.m?(ts|js)$/,
exclude: /node_modules/,
exclude: /node_modules\/(?!(stellar-base|js-xdr))/,
use: {
loader: 'babel-loader',
options: {
Expand Down

0 comments on commit bb7f443

Please sign in to comment.