Skip to content
This repository was archived by the owner on Feb 8, 2024. It is now read-only.

Commit 377bad1

Browse files
committed
1 parent 0239bf5 commit 377bad1

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@swc/register",
3-
"version": "0.1.6",
3+
"version": "0.1.7",
44
"description": "Super fast alternative for babel-register",
55
"main": "lib/index.js",
66
"scripts": {

src/node.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import deepClone from "lodash.clonedeep";
2-
import sourceMapSupport from "source-map-support";
3-
import escapeRegExp from "lodash.escaperegexp";
41
import * as swc from "@swc/core";
5-
import { addHook } from "pirates";
62
import fs from "fs";
3+
import deepClone from "lodash.clonedeep";
4+
import escapeRegExp from "lodash.escaperegexp";
75
import path from "path";
6+
import { addHook } from "pirates";
7+
import sourceMapSupport from "source-map-support";
88

99
export interface InputOptions extends TransformOptions {
1010
extensions?: string[];
@@ -61,7 +61,7 @@ function compile(code: string | any, filename: string) {
6161
delete opts.ignore;
6262
const output: swc.Output = swc.transformSync(code, {
6363
...opts,
64-
sourceMaps: opts.sourceMaps === undefined ? "both" : opts.sourceMaps
64+
sourceMaps: opts.sourceMaps === undefined ? "inline" : opts.sourceMaps
6565
});
6666

6767
if (output.map) {

0 commit comments

Comments
 (0)