# babel-plugin-import-remove-resource-query

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

Latest version **1.0.0** (published 2018-01-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install babel-plugin-import-remove-resource-query
pnpm add babel-plugin-import-remove-resource-query
yarn add babel-plugin-import-remove-resource-query
bun add babel-plugin-import-remove-resource-query
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2018-01-09 |
| First published | 2018-01-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Henrik J |
| Maintainers | hkjorgensen |
| Keywords | babel, webpack, plugin, import, resource, query, resourceQuery, require, jest |

## Links

- npm: https://www.npmjs.com/package/babel-plugin-import-remove-resource-query
- Repository: https://github.com/hkjorgensen/babel-plugin-import-remove-resource-query
- Homepage: https://github.com/hkjorgensen/babel-plugin-import-remove-resource-query#readme
- Issues: https://github.com/hkjorgensen/babel-plugin-import-remove-resource-query/issues
- npm.io page: https://npm.io/package/babel-plugin-import-remove-resource-query

## Alternatives

- [gamedig](https://npm.io/package/gamedig.md) — 29.3K weekly downloads
- [join-monster](https://npm.io/package/join-monster.md) — 12.8K weekly downloads
- [masked](https://npm.io/package/masked.md) — 5.5K weekly downloads
- [@comunica/actor-query-process-explain-logical](https://npm.io/package/@comunica/actor-query-process-explain-logical.md) — 4.7K weekly downloads
- [@veracity/vui](https://npm.io/package/@veracity/vui.md) — 4.6K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2018-01-09

## README

# babel-plugin-import-remove-resource-query
Remove the resourceQuery param when importing modules via babel. Useful with [Jest](https://facebook.github.io/jest/) and [babel-jest](https://github.com/babel/babel-jest), that [doesn't support resourceQueries](https://github.com/facebook/jest/issues/4181)

## Example
```js
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:
```js
import 'path/to/file'
import foo from 'path/to/file'
import bar, { baz } from 'path/to/file'
require('path/to/file')
```

## Installation
With [npm](https://www.npmjs.com/) do:
```bash
npm install babel-plugin-import-remove-resource-query --save-dev
```
With [yarn](https://yarnpkg.com) do:
```bash
yarn add --dev babel-plugin-import-remove-resource-query
```

## With `babel-jest`
In tour babelTransform.js file add the plugin like so:
```js
module.exports = babelJest.createTransformer({
  plugins: [
    'babel-plugin-import-remove-resource-query'
  ]
})
```

---
_Source: https://npm.io/package/babel-plugin-import-remove-resource-query · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
