marko-js / marko

A declarative, HTML-based language that makes building web apps fun

Home Page:https://markojs.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`Marko is not defined` when index.marko imports module from component.ts

bill-min opened this issue · comments

Marko Version: 5.32.7

Details

In any component, if you have:

index.marko

import { MY_ENUM } from "./component.ts"

<div>
  ${MY_ENUM.TEST}
</div>

component.ts

export interface Input {}

export enum MY_ENUM {
  TEST
}

export default class extends Marko.Component<Input> {}

It will cause error Marko is not defined. This happens to me when running storybook (with vite).

Expected Behavior

Should work without error.

Actual Behavior

Marko is not defined

Possible Fix

Additional Info

Your Environment

  • Environment name and version (e.g. Chrome 39, node.js 5.4):
  • Operating System and version (desktop or mobile):
  • Link to your project:

Steps to Reproduce

  1. first...

Stack Trace