You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Dynamic import() drops its second options argument #1473
Obfuscating a dynamic import() call with a second options argument (such as { with: { type: "json" } }) should preserve the second argument in the generated output:
import('./data.json',{'with': {'type': 'json'}});
Current Behavior
Obfuscating a dynamic import() that passes a second options argument parses without error since #1276 was resolved, but drops the second argument from the generated output:
import('./data.json');
This causes JSON or CSS module imports to fail at runtime with ERR_IMPORT_ATTRIBUTE_MISSING.
Inspect the output returned by .getObfuscatedCode().
Observe that the second options argument { with: { type: "json" } } is missing from the generated import() expression.
JavaScript Obfuscator Edition
JavaScript Obfuscator Open Source
Your Environment
Obfuscator version used: 5.10.0
Node version used: v24.14.1
Stack trace
N/A (no exception during obfuscation; at runtime in Node.js, importing a JSON module without attributes throws TypeError [ERR_IMPORT_ATTRIBUTE_MISSING]: Module "./data.json" needs an import attribute of "type: json").
Minimal working example that will help to reproduce issue
Activity