Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-nebenan-import-remove-resource-query

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-nebenan-import-remove-resource-query

Remove the resourceQuery param when importing modules via babel. Useful with Jest, that doesn't support resourceQueries

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9
Maintainers
1
Weekly downloads
 
Created
Source

babel-plugin-import-remove-resource-query

Remove the resourceQuery param when importing modules via babel. Useful with Jest and babel-jest, that doesn't support resourceQueries

Example

import 'path/to/file?resourceQuery'
import foo from 'path/to/file?query'
import bar, { baz } from 'path/to/file?query'
require('path/to/file?resourceQuery')

becomes:

import 'path/to/file'
import foo from 'path/to/file'
import bar, { baz } from 'path/to/file'
require('path/to/file')

Installation

With npm do:

npm install babel-plugin-import-remove-resource-query --save-dev

With yarn do:

yarn add --dev babel-plugin-import-remove-resource-query

With babel-jest

In tour babelTransform.js file add the plugin like so:

module.exports = babelJest.createTransformer({
  plugins: [
    'babel-plugin-import-remove-resource-query'
  ]
})

Keywords

FAQs

Package last updated on 14 Apr 2022

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc