Skip to content

bug: Build succeeds first time, but fails second time #6250

@petercmuc

Description

@petercmuc

Prerequisites

Stencil Version

4.*

Current Behavior

With an incorrect import path to a typescript interface the first build succeeds.
This happens when the import path is transpiled to the component.d.ts type definition.

Expected Behavior

All builds with incorrect import paths should fail

System Info

Steps to Reproduce

See the Git repo for reproduction...

In a component use an event emitter which uses an interface:

import { MyType } from "./../types/myType";

@Component({
  tag: "app-root",
  styleUrl: "app-root.css",
  shadow: true,
})
export class AppRoot {
  @Event({ eventName: "myTypeEvent" }) showMessage: EventEmitter<MyType>;

  render() {
    return <div> Build Error Test</div>;
  }
}
  1. build the app using "npm run build" - all fine.
  2. Change the import path to something incorrect and build again: the build succeeds.
  3. A second and subsequent builds fail, however.

Code Reproduction URL

https://github.com/petercmuc/build-error

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug: ValidatedThis PR or Issue is verified to be a bug within StencilHelp Wanted

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions