Skip to content

Stencil + Lerna integration #2648

@splitinfinities

Description

@splitinfinities

Stencil version:

 @stencil/core@2.0.0-6

I'm submitting a:

[x] bug report
[ ] feature request
[ ] support request

Current behavior:
I have two branches on this repo that try to document Lerna integration issues:

Within this repo, I have a small tree: a fake-app component that includes the dependent-component and another-dependent packages, and uses those element in it's render function. The another-dependent has a deep-dependent in it's render function.

Each of these components were made with npm init stencil component component-name, and brought up to spec from 1.17.3 to what 2.0.0-6 asks for.

with the NPM flow right out the gate, it seems the package references the collection, but collection isn't available:
GET http://localhost:3333/another-dependent/dist/collection/components/another-dependent/another-dependent.js net::ERR_ABORTED 404 (Not Found)

Expected behavior:

Through this I found a few issues:

  • The collection entries in package.json will need the same validation treatment that Stencil outputs when main or module are incorrectly set.
  • I looked into the dist folder and only had 3 folders - the component's name, custom-elements, and types. There was no collection folder.
  • ...incoming

I'm going to keep this open for other issues I may find and note my edits.

Steps to reproduce:
For the NPM branch:

  • Check out NPM
  • Do npm run bootstrap && npm run build
  • Run npm start to get the server started.
  • Make edits to any given component, and test changes.

For the Yarn branch:

  • Check out Yarn Workspaces
  • Do yarn bootstrap && yarn build
  • Run yarn start to get the server started.
  • Make edits to any given component, and test changes.

Other information:
You'll notice that only the app pops open in your browser. Look in the stencil.config.ts files for the ports for each individual component, if needed. The packages are imported in the src/index.ts file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature: Want this? Upvote it!This PR or Issue may be a great consideration for a future idea.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions