kaicataldo / eleventy-plugin-react

A plugin that allows you to use React as a templating language for Eleventy
MIT License
37 stars 4 forks source link

Configurable file extensions #13

Closed dpfavand closed 3 years ago

dpfavand commented 3 years ago

Can we consider making file extensions configurable? Particularly thinking for cases where we want to handle TSX files, but not JS files.

I'd imagine adding an extensions property to the configuration object, an array of extensions that would override defaults:

  eleventyConfig.addPlugin(eleventyReact, {
    extensions: ['tsx']
  });
kaicataldo commented 3 years ago

This should be relatively trivial to implement. PRs welcome!

kaicataldo commented 3 years ago

Implemented in https://github.com/kaicataldo/eleventy-plugin-react/commit/d1fec2a1553ea454da852f323441841b70d63970 and released in v0.11.0.