megawac / babel-plugin-ramda

Easy :ram: modular builds
311 stars 33 forks source link

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

Open mattgrande opened 5 years ago

mattgrande commented 5 years ago

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.

antonk52 commented 5 years ago

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.

damiangreen commented 4 years ago

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",

mattgrande commented 4 years ago

@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.