babel-plugin-ramda icon indicating copy to clipboard operation
babel-plugin-ramda copied to clipboard

Can't seem to get it to work...

Open mattgrande opened this issue 5 years ago • 3 comments

I'm sure this is a configuration issue on my end, but I'm a bit stuck.

  1. I've installed v1.6.3 (as I'm on babel 6.26)
  2. I added this to my .babelrc: ["ramda", { "useES": true }]
  3. I rebuild everything... and my package size is the same, even though I'm only using a bit of Ramda

Here's my full babel file, if that helps:

{
  "presets": [
    ["env", {
      "modules": false,
      "targets": {
        "browsers": "> 1%",
        "uglify": true
      },
      "useBuiltIns": true
    }]
  ],

  "plugins": [
    ["ramda", { "useES": true }],
    "syntax-dynamic-import",
    "transform-object-rest-spread",
    ["transform-class-properties", { "spec": true }]
  ]
}

Please let me know if there's anything else I can provide.

mattgrande avatar Jan 25 '19 15:01 mattgrande

Can you expand on what kind of error you get or the expected behaviour that is not happening? It is quite difficult to tell what goes wrong from your description. I suppose you already tried running your build with other plugins disabled one by one to make sure that it is not ramda plugin not playing nicely with other specific plugin. A sample repo which can reproduce the issue would also help a lot.

antonk52 avatar May 09 '19 21:05 antonk52

Was there a solution to this?.

I tried both with and without the useES: true,.

My chunk size remains identical before and after.

My .babelrc:

module.exports = {
  presets: [
    [
      '@babel/preset-env',
      {
        targets: {
          node: 'current',
        },
      },
    ],
    '@babel/preset-typescript',
    '@babel/preset-react',
  ],
  plugins: [
    '@babel/plugin-syntax-dynamic-import',
    '@babel/plugin-syntax-import-meta',
    '@babel/plugin-proposal-class-properties',
    '@babel/plugin-proposal-json-strings',
    '@babel/plugin-proposal-optional-chaining',
    '@babel/plugin-proposal-nullish-coalescing-operator',
    'ramda'
  ],
  ignore: ['node_modules', 'build'],
}

"@babel/core": "^7.6.0", "@babel/node": "^7.6.1",

damiangreen avatar Jan 09 '20 23:01 damiangreen

@damiangreen - Unfortunately not, and I've since moved to a new job where I'm not (currently) using ramda or babel, so I can't easily reproduce.

mattgrande avatar Jan 14 '20 20:01 mattgrande