Skip to content

Commit

Permalink
remove process dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
thescientist13 committed Jan 19, 2023
1 parent 316ff4c commit d9b8047
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/jsx-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import fs from 'fs';
import jsx from 'acorn-jsx';
import { parse, parseFragment, serialize } from 'parse5';

const baseURL = new URL(`file://${process.cwd()}/`);
const jsxRegex = /\.(jsx)$/;

// TODO same hack as definitions
Expand Down Expand Up @@ -212,7 +211,7 @@ function findThisReferences(context, statement) {
} else if (isRenderFunctionContext && type === 'VariableDeclaration') {
statement.declarations.forEach(declaration => {
const { init, id } = declaration;

if (init.object && init.object.type === 'ThisExpression') {
// const { description } = this.todo;
references.push(init.property.name);
Expand Down Expand Up @@ -363,7 +362,7 @@ export function parseJsx(moduleURL) {
// --------------

export function resolve(specifier, context, defaultResolve) {
const { parentURL = baseURL } = context;
const { parentURL } = context;

if (jsxRegex.test(specifier)) {
return {
Expand Down

0 comments on commit d9b8047

Please sign in to comment.