Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

issue with loading babel() in esbuild.plugins[] #8

Description

@noahehall

having issue using this plugin in my esbuild.config.json.

I just copy pasted your example, throws error immediately.

 > node_modules/statuses/index.js:13:20: error: [plugin: babel] /[appdir]/node_modules/statuses/codes.json: Missing semicolon. (2:7)

  1 | {
> 2 |   "100": "Continue",
    |        ^
  3 |   "101": "Switching Protocols",
  4 |   "102": "Processing",
  5 |   "103": "Early Hints",
     13 │ var codes = require('./codes.json');


    ╵                          ~~~~~~~~~~~
   node_modules/esbuild/lib/main.js:756:22: note: This error came from the "onLoad" callback registered here
    756 │         let promise = setup({
        ╵                       ^
    at setup (file:///[appdir]/node_modules/esbuild-plugin-babel/src/index.js:36:9)

you can see the error in action by uncommenting this lline

and running npm start

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