Skip to content

AssemblyScript 0.10.0 : Imports that specify a file extension no longer work #1282

@torch2424

Description

@torch2424

Noticed this behavior after upgrading some more projects to 0.10.0. I would use syntax like:

import { exportedFunc } from "./export.ts";
import {add} from "my-other-package";

export function hello(): i32 {
  return add(exportedFunc(), exportedFunc);
}

However, imports with a file extension, (or external packages that import with a file extension), no longer can be found, and you will get errors like:

Screenshot from 2020-05-18 14-48-37
Screenshot from 2020-05-18 14-47-55

Made a quick little test case at: https://github.com/torch2424/as-playground/tree/master/import-file-extension

I feel this is probably due how we can now specify the file extension in the CLI itself 😄

And if you point me to where in the project this could probably be fixed, would be happy to open a PR for this. Thanks! 😄 👍

cc @MaxGraey @dcodeIO

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions