@deephaven/babel-preset 0.5.2-beta.0 → 0.6.1-demo.8

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 +10 -3
  2. package/package.json +3 -2
package/index.js CHANGED
@@ -6,19 +6,26 @@ module.exports = api => ({
6
6
  // Setting false will NOT convert ES6 to CJS modules
7
7
  // Test env must set to auto since Jest ESM support is experimental
8
8
  modules: api.env('test') ? 'auto' : false,
9
+ targets: api.env('test')
10
+ ? undefined
11
+ : {
12
+ esmodules: true,
13
+ },
9
14
  },
10
15
  ],
11
16
  '@babel/preset-react',
12
17
  '@babel/preset-typescript',
13
18
  ],
14
19
  plugins: [
20
+ '@babel/plugin-proposal-class-properties',
21
+ api.env('test') ? false : ['babel-plugin-add-import-extension'],
15
22
  [
16
23
  'transform-rename-import',
17
24
  {
18
- original: '^(.+?)\\.scss$',
25
+ // The babel-plugin-add-import-extension adds the .js to .scss imports, just convert them back to .css
26
+ original: '^(.+?)\\.s?css.js$',
19
27
  replacement: '$1.css',
20
28
  },
21
29
  ],
22
- '@babel/plugin-proposal-class-properties',
23
- ],
30
+ ].filter(Boolean),
24
31
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deephaven/babel-preset",
3
- "version": "0.5.2-beta.0+0936be9",
3
+ "version": "0.6.1-demo.8+c76ccf6",
4
4
  "description": "Deephaven Babel preset",
5
5
  "repository": "https://github.com/deephaven/web-client-ui",
6
6
  "author": "Deephaven Data Labs LLC",
@@ -12,10 +12,11 @@
12
12
  "@babel/preset-env": "^7.14.4",
13
13
  "@babel/preset-react": "^7.13.13",
14
14
  "@babel/preset-typescript": "^7.13.0",
15
+ "babel-plugin-add-import-extension": "^1.6.0",
15
16
  "babel-plugin-transform-rename-import": "^2.3.0"
16
17
  },
17
18
  "publishConfig": {
18
19
  "access": "public"
19
20
  },
20
- "gitHead": "0936be95c2308353398af459d9e661a733f1ffde"
21
+ "gitHead": "c76ccf69544672164d23b2f77dc00dce39ae80a2"
21
22
  }