Skip to content

Commit

Permalink
feat: use babel-preset-env-modules (#35)
Browse files Browse the repository at this point in the history
* feat: use babel-preset-env-modules

* remove esmodules target
  • Loading branch information
kyletsang authored May 9, 2021
1 parent 7554705 commit fcab148
Show file tree
Hide file tree
Showing 3 changed files with 413 additions and 9 deletions.
6 changes: 1 addition & 5 deletions packages/babel-preset/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
const presetEnv = require('@babel/preset-env');
const presetReact = require('@babel/preset-react');
const classProperties = require('@babel/plugin-proposal-class-properties');
const exportDefaultFrom = require('@babel/plugin-proposal-export-default-from');
Expand Down Expand Up @@ -30,13 +29,10 @@ module.exports = (
) => ({
presets: [
[
presetEnv,
'babel-preset-env-modules',
{
modules,
loose: true,
ignoreBrowserslistConfig: true,
shippedProposals: true,
include: ['proposal-object-rest-spread'],
targets: {
browsers: browserlist,
},
Expand Down
3 changes: 2 additions & 1 deletion packages/babel-preset/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"@babel/preset-react": "^7.12.13",
"babel-plugin-add-module-exports": "^1.0.4",
"babel-plugin-dev-expression": "^0.2.2",
"babel-plugin-transform-react-remove-prop-types": "^0.4.24"
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
"babel-preset-env-modules": "^1.0.1"
}
}
Loading

0 comments on commit fcab148

Please sign in to comment.