We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 031a239 commit dd22d16Copy full SHA for dd22d16
3 files changed
lib/__tests__/index.js
@@ -1,20 +1,23 @@
1
-const babel = require('babel-core')
+const babel = require('@babel/core')
2
const plugin = require('../index.js')
3
+
4
const options = {
5
presets: [
- ["es2015", {
6
+ ["@babel/env", {
7
"modules": false
8
}]
9
],
- plugins: [plugin]
10
+ plugins: [
11
+ plugin
12
+ ]
13
}
14
-it('Imports stripped', () => {
15
+it('Module imports are stripped', () => {
16
var example = `
17
import fs from 'fs'
18
import path from 'path'
19
`
20
21
const {code} = babel.transform(example, options)
22
expect(code.length).toBe(0)
-})
23
+})
0 commit comments