---
title: "Discussion on \"esMain(import.meta) in Nue.js source code.\" | Hashnode"
description: "Discussion on \"esMain(import.meta) in Nue.js source code.\". In this article, we will review a function, esMain(), in Nue.js source code. You will find the below code snippet at line 127 in packages/nuekit/cli.js.\n// Only run main when called as real CLI\nif (esMain(import.meta)) {\n\nWhat caught my attention is ..."
url: "https://hashnode.com/posts/esmainimportmeta-in-nuejs-source-code/67f5e9db38c0c4769eb4528d"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [esMain(import.meta) in Nue.js source code.](https://thinkthroo.com/blog/esmainimportmeta-in-nuejs-source-code?utm_source=hashnode&utm_medium=feed)

In this article, we will review a function, esMain(), in Nue.js source code. You will find the below code snippet at line 127 in packages/nuekit/cli.js. // Only run main when called as real CLI if (esMain(import.meta)) { What caught my attention is ...

Apr 9, 2025 · 2 min read · thinkthroo.com  
Updated Apr 23, 2025  
Read the article

-   [#nuejs](https://hashnode.com/tag/nuejs)
-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#opensource](https://hashnode.com/tag/opensource)
-   [#import](https://hashnode.com/tag/import)
-   [#meta](https://hashnode.com/tag/meta)

## Written by

[Ramu Narasinga](https://hashnode.com/@ramunarasinga)

@ramunarasinga · India

  
[View profile](https://hashnode.com/@ramunarasinga)

I study large open-source projects and create content about their codebase architecture and best practices, sharing it through articles, videos.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
