vihanb / babel-plugin-wildcard

Wildcard imports import a directories JS files
MIT License
186 stars 27 forks source link

noModifyCase not working #25

Closed paulm17 closed 6 years ago

paulm17 commented 6 years ago

My config:

{
  "presets": ["env"],
  "plugins": [
    "jsx-event-modifiers",
    "transform-vue-jsx",
    ["wildcard", {
      'noModifyCase': true,
      "exts": ["js", "es6", "es", "jsx", "javascript", "vue"]
    }]
  ]
}

I have a filename sec_1_column.jsx, which still becomes Sec1Column.

vihanb commented 6 years ago

This is odd... are you using latest version of plugin?

I have two recommendations:

paulm17 commented 6 years ago

I installed it today:

"babel-plugin-wildcard": "^5.0.0",

Use double quotes insteead of single quotes

Just so you know. I copied and pasted from the readme. But I will give this a go tomorrow and let you know.

Clear cache using npx bpwc clear-cache.

Didn't know about that. Will give that a go as well.

then restart any build programs/watcher/hot reloading script you have running so config changes apply

Have tried that already. But will do so in conjunction with the other two tips you mentioned.


Many thanks for the quick follow up too. 👍

paulm17 commented 6 years ago

Use double quotes insteead of single quotes

Doing that change resolved it for me. You should update the readme, as the examples are in single quotes.

Many thanks for your help.