Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ async function transformJavaScriptImpl(

// Run advanced optimizations using our fast oxc-transform
if (options.advancedOptimizations) {
const { transform } = await import('../babel/plugins/oxc-transform.js');
const { transform } = await import('../oxc/oxc-transform.js');
const sideEffectFree = options.sideEffects === false;
const safeAngularPackage =
sideEffectFree && /[\\/]node_modules[\\/]@angular[\\/]/.test(filename);
Expand All @@ -171,7 +171,6 @@ async function transformJavaScriptImpl(
const result = transform(filename, code, {
sourcemap: useInputSourcemap,
sideEffects: options.sideEffects,
jit: options.jit,
topLevelSafeMode,
});
code = result.code;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ import remapping, { type EncodedSourceMap } from '@ampproject/remapping';
import type { BindingIdentifier, Class, Node } from '@oxc-project/types';
import { MagicString } from 'magic-string';
import { Visitor, parseSync } from 'oxc-parser';
import { loadInputSourceMap } from '../../../utils/source-map';
import { loadInputSourceMap } from '../../utils/source-map';

export interface OxcTransformOptions {
sourcemap?: boolean;
jit?: boolean;
sideEffects?: boolean;
topLevelSafeMode?: boolean;
pureAnnotate?: boolean;
Expand Down Expand Up @@ -261,7 +260,6 @@ export function transform(filename: string, code: string, options: OxcTransformO
const s = new MagicString(code);

const sideEffectFree = options.sideEffects === false;
const safeAngularPackage = sideEffectFree && /[\\/]node_modules[\\/]@angular[\\/]/.test(filename);
const topLevelSafeMode = options.topLevelSafeMode ?? false;
const wrapDecorators = sideEffectFree;
const pureAnnotate = options.pureAnnotate ?? true;
Expand Down