@deephaven/babel-preset 0.35.1-sideEffects.3 → 0.35.1-test-envoy.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +11 -3
  2. package/package.json +3 -2
package/index.js CHANGED
@@ -22,13 +22,21 @@ module.exports = api => ({
22
22
  plugins: [
23
23
  api.env('test')
24
24
  ? [
25
- // This is needed to replace import.meta w/ process in Jest
25
+ // This is needed to replace import.meta.env w/ process in Jest
26
26
  // Jest does not play nicely w/ ESM and Vite uses import.meta
27
27
  // import.meta is only avaialable in ESM
28
28
  path.resolve(__dirname, 'importMetaEnvPlugin'),
29
29
  ]
30
- : // The add-import-extension plugin causes Jest to error, but is needed for proper ESM builds
31
- ['babel-plugin-add-import-extension'],
30
+ : false,
31
+ api.env('test')
32
+ ? [
33
+ // Also need to handle import.meta.url
34
+ 'babel-plugin-transform-import-meta',
35
+ ]
36
+ : false,
37
+ api.env('test')
38
+ ? false // The add-import-extension plugin causes Jest to error, but is needed for proper ESM builds
39
+ : ['babel-plugin-add-import-extension'],
32
40
  [
33
41
  'transform-rename-import',
34
42
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deephaven/babel-preset",
3
- "version": "0.35.1-sideEffects.3+9dd055ba",
3
+ "version": "0.35.1-test-envoy.18+6e346a00",
4
4
  "description": "Deephaven Babel preset",
5
5
  "repository": {
6
6
  "type": "git",
@@ -17,10 +17,11 @@
17
17
  "@babel/preset-react": "^7.18.0",
18
18
  "@babel/preset-typescript": "^7.18.0",
19
19
  "babel-plugin-add-import-extension": "^1.6.0",
20
+ "babel-plugin-transform-import-meta": "^2.2.0",
20
21
  "babel-plugin-transform-rename-import": "^2.3.0"
21
22
  },
22
23
  "publishConfig": {
23
24
  "access": "public"
24
25
  },
25
- "gitHead": "9dd055bad4a66ef05ce953a1df0fa6ef5ccb0ea8"
26
+ "gitHead": "6e346a00a90210a7f7dfa97a06c1bd998b70b68b"
26
27
  }