Skip to content

Commit

Permalink
WIP commonjs browser build
Browse files Browse the repository at this point in the history
  • Loading branch information
ctavan committed Feb 17, 2022
1 parent 13ceb79 commit 68c019e
Show file tree
Hide file tree
Showing 8 changed files with 9,658 additions and 9 deletions.
11 changes: 7 additions & 4 deletions babel.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@
"presets": [],
"plugins": [],
"env": {
"commonjs": {
"commonjsNode": {
"presets": [["@babel/preset-env", { "targets": { "node": "10" }, "modules": "commonjs" }]]
},
"esmBrowser": {
"presets": [["@babel/preset-env", { "modules": false }]]
},
"esmNode": {
"presets": [["@babel/preset-env", { "targets": { "node": "10" }, "modules": false }]]
},
"commonjsBrowser": {
"presets": [["@babel/preset-env", { "modules": "commonjs" }]]
},
"esmBrowser": {
"presets": [["@babel/preset-env", { "modules": false }]]
}
}
}
5 changes: 5 additions & 0 deletions examples/jest-uuid-main/jsdom.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/** @jest-environment jsdom */

const uuid = require('uuid');

console.log(uuid.v4());
3 changes: 3 additions & 0 deletions examples/jest-uuid-main/node.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const uuid = require('uuid');

console.log(uuid.v4());
Loading

0 comments on commit 68c019e

Please sign in to comment.