Skip to content

nbb.core/*file* doesn't survive bundle #377

Description

@chr15m

I am not sure if this is a bug or a feature request.

nbb v1.3.196
Ubuntu 22.04
Node v20.17.0

If you run nbb bundle printme.cljs -o printme.mjs and run the resulting script with node printme.mjs, any reference to nbb.core/*file* doesn't survive.

(ns printme
  (:require [nbb.core :refer [*file*]]))
(print *file*)
npx nbb bundle printme.cljs -o printme.mjs
npx nbb printme.cljs # outputs the path to the script
node printme.mjs # outputs nil

I expected *file* to be the .mjs script's location.

I can hack around this for now of course but I thought I'd file it just in case.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions