
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
babel-plugin-smart-import-path-extensions
Advanced tools
Babel plugin to correctly add missing file extensions to import statements
Babel plugin to correctly add missing file extensions to import statements.
extentions options will be used.extentions options) a warning is printedAssume we have these three files: ./foo.tsx, ./foobar.js, and
// bar.ts
import foo from './foo'
import { foobar } from './foobar'
import React from 'react'
import { no } from './does-not-exist' // This files does not exist
Using the default configuration of this plugin, the imports in bar.ts will be converted to:
// bar.ts
import foo from './foo.tsx'
import { foobar } from './foobar.js'
import React from 'react'
import { no } from './does-not-exist' // This files does not exist
For cases where you only need to check for the file extentions ['js', 'ts', 'jsx', 'tsx'], you can simply add smart-import-path-extensions to your .babelrc file:
{
"plugins": ["smart-import-path-extensions"]
}
Passing the ['js', 'ts', 'jsx', 'tsx'], you can simply add smart-import-path-extensions to your .babelrc file:
{
"plugins": ["smart-import-path-extensions", {"extensions": ["js","jsx","json"]}]
}
FAQs
Babel plugin to correctly add missing file extensions to import statements
We found that babel-plugin-smart-import-path-extensions demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.