Skip to content

akameco/babel-plugin-jsx-target-blank

Repository files navigation

babel-plugin-jsx-target-blank

Build Status tested with jest styled with prettier All Contributors

for external link

Install

npm:

$ npm install --save-dev babel-plugin-jsx-target-blank

yarn:

$ yarn add --dev babel-plugin-jsx-target-blank

Usage

.babelrc

{
  "plugins": ["jsx-target-blank"]
}

Examples

<a href="akameco.github.io" target="_blank">akameco</a>

           

<a href="akameco.github.io" target="_blank" rel="noopener noreferrer">akameco</a>

with other tags

<a href="akameco.github.io" target="_blank" rel="noopener prefetch">
  akameco
</a>

           

<a href="akameco.github.io" target="_blank" rel="noopener prefetch noreferrer">
  akameco
</a>

with external link

<a href={externalLink} target="_blank">akameco</a>

           

<a href={externalLink} target="_blank" rel="noopener noreferrer">akameco</a>

Contributors

Thanks goes to these wonderful people (emoji key):


akameco

💻 📖 ⚠️ 🚇

This project follows the all-contributors specification. Contributions of any kind welcome!

License

MIT © akameco

About

add 'noopener noreferrer' to external link for security

Resources

License

Stars

Watchers

Forks

Packages

No packages published