Socket
Socket
Sign inDemoInstall

babel-plugin-jsx-strip-ext

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    babel-plugin-jsx-strip-ext

Strip .jsx extension from import sources


Version published
Weekly downloads
5
increased by400%
Maintainers
1
Install size
4.30 kB
Created
Weekly downloads
 

Readme

Source

babel-plugin-jsx-strip-ext Build Status Dependency Status

Strip .jsx extension from import sources.

Example

input.js

import Foo from './Foo.jsx'

.babelrc

{
  "presets": ["react", "es2015"],
  "plugins": ["jsx-strip-ext"]
}

output.js

'use strict';
var _Foo = require('./Foo');
var _Foo2 = _interopRequireDefault(_Foo);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

Usage

{
  "plugins": ["jsx-strip-ext"]
}

Via Node API

require('babel-core').transform('code', {
  plugins: ['jsx-strip-ext']
})

js-standard-style

Keywords

FAQs

Last updated on 11 Apr 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc