Skip to content

Commit

Permalink
Merge branch 'canary' into merceyz/absolute-runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
merceyz committed Nov 26, 2020
2 parents d23a71f + 9dd5ff2 commit 55259aa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion packages/next/build/babel/preset.ts
@@ -1,6 +1,5 @@
import { PluginItem } from 'next/dist/compiled/babel/core'
import { dirname } from 'path'

const env = process.env.NODE_ENV
const isProduction = env === 'production'
const isDevelopment = env === 'development'
Expand Down
4 changes: 2 additions & 2 deletions test/unit/next-babel.unit.test.js
Expand Up @@ -64,8 +64,8 @@ describe('next/babel', () => {
expect(output).toMatch(`__jsx(${react}.Fragment`)
expect(output).toMatch(`__jsx("a",{href:"/"`)

expect(babel(`const a = ()=><a href="/">home</a>`)).toMatch(
`var _react=_interopRequireDefault(require("react"));var __jsx=_react["default"].createElement;var a=function a(){return __jsx("a",{href:"/"},"home");};`
expect(babel(`const a = ()=><a href="/">home</a>`)).toMatchInlineSnapshot(
`"\\"use strict\\";var _interopRequireDefault=require(\\"@babel/runtime/helpers/interopRequireDefault\\");var _react=_interopRequireDefault(require(\\"react\\"));var __jsx=_react[\\"default\\"].createElement;var a=function a(){return __jsx(\\"a\\",{href:\\"/\\"},\\"home\\");};"`
)
})

Expand Down

0 comments on commit 55259aa

Please sign in to comment.