Skip to content

OSS compiler throws when accessing non public API from the engine #1009

Open
@pmdartus

Description

@pmdartus

Description

In order to test the @lwc/engine test files need access to some of the @lwc/engine protected APIs like isNodeFromTemplate. However, the OSS compiler throws when accessing those APIs.

import { isNodeFromTemplate } from 'lwc';
//       ^ Compilation Error: isNodeFromTemplate is not exported by lwc

I generally think we should not try to restrict the during the OSS compilation what API can be accessed. It can be restricted migrating the checks in eslint rules. Those rules can then be disabled in some specific cases (e.g. testing the engine internals).

Version

  • LWC: 0.35.4

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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions