-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ESM by default, new compiler and TS support
- Loading branch information
1 parent
073f6ab
commit 0dc5f95
Showing
11 changed files
with
143 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
const buildTarget = process.env.BUILD_TARGET; | ||
|
||
module.exports = { | ||
presets: [ | ||
"@babel/preset-env", | ||
"@babel/preset-typescript" | ||
], | ||
plugins: [ | ||
[ | ||
"module-resolver", | ||
{ | ||
root: ["./dist"], | ||
alias: buildTarget === 'esm' ? { | ||
"./data/bible.json": "../data/bible.json", | ||
"./utils/abbreviations": "../utils/abbreviations", | ||
"./utils/validation": "../utils/validation" | ||
} : { | ||
"./data/bible.json": "./data/bible.json", | ||
"./utils/abbreviations": "./utils/abbreviations", | ||
"./utils/validation": "./utils/validation" | ||
} | ||
} | ||
] | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.