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
import.meta not supported inside wxt.config.ts file #934
Try using import.meta.dirname inside wxt.config.ts file.
✖ Command failed after 96 ms 5:14:37 PM
ERROR Cannot use 'import.meta' outside a module 5:14:37 PM
import.meta.dirname;
^^^^
SyntaxError: Cannot use 'import.meta' outside a module
at new Script (node:vm:99:7)
at createScript (node:vm:255:10)
at Object.runInThisContext (node:vm:303:10)
Reproduction
Use import.meta.dirname inside wxt.config.ts file.
Activity
aklinker1 commentedon Aug 21, 2024
Duplicate of #297. The file is loaded as this weird CJS/ESM hybrid, and it doesn't support all ESM features, like
import.meta.dirname.Use
__dirnameinstead.