-
Notifications
You must be signed in to change notification settings - Fork 227
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
examples: improve minimal example (#688)
* examples: remove node_modules from minimal server bundle * examples: simplify minimal example webpack build configuration
- Loading branch information
1 parent
479a9b1
commit 881084c
Showing
4 changed files
with
46 additions
and
44 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,14 @@ | ||
const isNodeTarget = (api) => | ||
api.caller((caller) => caller && caller.target === "node"); | ||
|
||
module.exports = (api) => ({ | ||
presets: [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
targets: isNodeTarget(api) ? { node: "current" } : "defaults", | ||
}, | ||
], | ||
"@babel/preset-react", | ||
], | ||
}); |
This file was deleted.
Oops, something went wrong.
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