Skip to content

type=module packages are not translated correctly if they are v2 addons #1674

@NullVoxPopuli

Description

@NullVoxPopuli

This is an issue for tracking exploration in #1572
And this is separate from this type=module issue: #1672

It is not possible to reproduce this behavior in the a monorepo setup for some reason, even with injected dependencies.

Repro:

  • create v2 addon
  • add type=module to package.json
  • publish it (or use @universal-ember/preem @ 0.1.0)
  • create separate app in separate repo/folder
  • add the above package
  • start the app
  • visit /
  • receive error:
    Module not found: Error: Can't resolve '.' in '/home/nullvoxpopuli/Development/NullVoxPopuli/package-majors/node_modules/.embroider/rewritten-packages/@glimmer/component.23618b61'
    Did you mean 'index.js'?
    BREAKING CHANGE: The request '.' failed to resolve only because it was resolved as fully specified
    (probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
    The extension in the request is mandatory for it to be fully specified.
    Add the extension to the request.
    
    note that the error is calling out @glimmer/component.

best lead we have is this #1572 (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