Browse Source

Add babel-plugin-lodash

master
jeffvli 3 years ago
parent
commit
bf207b4993
  1. 4
      .erb/configs/webpack.config.base.js
  2. 12
      babel.config.js
  3. 4
      package.json
  4. 1400
      yarn.lock

4
.erb/configs/webpack.config.base.js

@ -18,6 +18,10 @@ export default {
loader: 'babel-loader', loader: 'babel-loader',
options: { options: {
cacheDirectory: true, cacheDirectory: true,
query: {
plugins: ['lodash'],
presets: [['@babel/env', { targets: { node: 6 } }]],
},
}, },
}, },
}, },

12
babel.config.js

@ -24,8 +24,10 @@ module.exports = (api) => {
require('@babel/preset-env'), require('@babel/preset-env'),
require('@babel/preset-typescript'), require('@babel/preset-typescript'),
[require('@babel/preset-react'), { development }], [require('@babel/preset-react'), { development }],
require('@babel/env', { targets: { node: 6 } }),
], ],
plugins: [ plugins: [
require('lodash'),
// Stage 0 // Stage 0
require('@babel/plugin-proposal-function-bind'), require('@babel/plugin-proposal-function-bind'),
@ -33,14 +35,8 @@ module.exports = (api) => {
require('@babel/plugin-proposal-export-default-from'), require('@babel/plugin-proposal-export-default-from'),
require('@babel/plugin-proposal-logical-assignment-operators'), require('@babel/plugin-proposal-logical-assignment-operators'),
[require('@babel/plugin-proposal-optional-chaining'), { loose: false }], [require('@babel/plugin-proposal-optional-chaining'), { loose: false }],
[ [require('@babel/plugin-proposal-pipeline-operator'), { proposal: 'minimal' }],
require('@babel/plugin-proposal-pipeline-operator'), [require('@babel/plugin-proposal-nullish-coalescing-operator'), { loose: false }],
{ proposal: 'minimal' },
],
[
require('@babel/plugin-proposal-nullish-coalescing-operator'),
{ loose: false },
],
require('@babel/plugin-proposal-do-expressions'), require('@babel/plugin-proposal-do-expressions'),
// Stage 2 // Stage 2

4
package.json

@ -133,6 +133,7 @@
] ]
}, },
"devDependencies": { "devDependencies": {
"@babel/cli": "^7.15.7",
"@babel/core": "^7.12.9", "@babel/core": "^7.12.9",
"@babel/plugin-proposal-class-properties": "^7.12.1", "@babel/plugin-proposal-class-properties": "^7.12.1",
"@babel/plugin-proposal-decorators": "^7.12.1", "@babel/plugin-proposal-decorators": "^7.12.1",
@ -152,7 +153,7 @@
"@babel/plugin-transform-react-constant-elements": "^7.12.1", "@babel/plugin-transform-react-constant-elements": "^7.12.1",
"@babel/plugin-transform-react-inline-elements": "^7.12.1", "@babel/plugin-transform-react-inline-elements": "^7.12.1",
"@babel/plugin-transform-runtime": "^7.12.1", "@babel/plugin-transform-runtime": "^7.12.1",
"@babel/preset-env": "^7.12.7", "@babel/preset-env": "^7.15.6",
"@babel/preset-react": "^7.12.7", "@babel/preset-react": "^7.12.7",
"@babel/preset-typescript": "^7.12.7", "@babel/preset-typescript": "^7.12.7",
"@babel/register": "^7.12.1", "@babel/register": "^7.12.1",
@ -188,6 +189,7 @@
"babel-jest": "^26.1.0", "babel-jest": "^26.1.0",
"babel-loader": "^8.2.2", "babel-loader": "^8.2.2",
"babel-plugin-dev-expression": "^0.2.2", "babel-plugin-dev-expression": "^0.2.2",
"babel-plugin-lodash": "^3.3.4",
"babel-plugin-transform-react-remove-prop-types": "^0.4.24", "babel-plugin-transform-react-remove-prop-types": "^0.4.24",
"browserslist-config-erb": "^0.0.1", "browserslist-config-erb": "^0.0.1",
"chalk": "^4.1.0", "chalk": "^4.1.0",

1400
yarn.lock

File diff suppressed because it is too large
Loading…
Cancel
Save