Beaker: Relative imports do not work in custom webterm commands

Created on 27 May 2020  路  2Comments  路  Source: beakerbrowser/beaker

Describe the bug
This is not an important bug, just thought I would include, especially for anyone else who is trying to figure it out!

Relative imports from the index.js file of a custom webterm command do not function and return a TypeError: Cannot read property 'yourCustomCommand' of undefined when installed. Absolute imports work file with the full 'hyper://xxx.." work fine.

To Reproduce
Steps to reproduce the behavior:

  1. Create a webterm command in a 'index.js' file
  2. Create a 'test.js' that exports a single constant
  3. Import said constant in index.js import {x} from "./test.js"
  4. Attempt to install command
  5. See error
  6. Note that if you change import to "hyper://xxx/test.js" it works fine.

Expected behavior
Either have relative imports succeed as expected, or fail with a more descriptive error message, telling user to use absolute paths.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Ubuntu
  • Browser: Beaker
  • Version: beta 2

Additional context
Nope! Again, not a major issue at all!

bug

Most helpful comment

Okay fixed

All 2 comments

Thanks for reporting, I'll check into it

Okay fixed

Was this page helpful?
0 / 5 - 0 ratings

Related issues

johanbove picture johanbove  路  3Comments

aaronshaf picture aaronshaf  路  3Comments

pmario picture pmario  路  4Comments

dasanchez picture dasanchez  路  3Comments

mundusnine picture mundusnine  路  3Comments