Skip to content

Conversation

@Timeless0911
Copy link
Contributor

Summary

should not throw minify error when using import.meta in iife output

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a minification error that occurs when using import.meta in IIFE (Immediately Invoked Function Expression) output format. The fix involves configuring the minifier to properly handle ES modules syntax by setting the module: true option in the minifier configuration.

  • Adds module: true to the minifier configuration to handle ES modules syntax correctly
  • Updates test files to include import.meta.dirname usage to verify the fix
  • Ensures IIFE output can properly handle import.meta without throwing minification errors

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
packages/core/src/config.ts Adds minifier configuration with module: true to handle ES modules syntax
tests/integration/iife/src/utils.ts Updates function to use import.meta.dirname for testing the fix
tests/integration/iife/index.test.ts Updates test expectation to include the new import.meta usage

@fi3ework fi3ework merged commit 8d4c565 into main Jul 22, 2025
14 checks passed
@fi3ework fi3ework deleted the fix/iife-import-meta branch July 22, 2025 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants