Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev server fails to rebuild dependencies #102

Closed
ryan-edge-ck opened this issue Aug 24, 2017 · 2 comments
Closed

Dev server fails to rebuild dependencies #102

ryan-edge-ck opened this issue Aug 24, 2017 · 2 comments

Comments

@ryan-edge-ck
Copy link

ryan-edge-ck commented Aug 24, 2017

Description of Problem

When using 3rd party dependencies in components, the dev server occasionally cannot build 3rd party dependencies

Expected Behavior

Rebuild is successful

Actual Result

On every other save, the rebuild fails, resulting in a "Cannot find module '' error."

image

Refer to example to reproduce issue

@zwacky
Copy link

zwacky commented Aug 27, 2017

I ran into the same issue (similar to #98). Then I revisited their configuration:

Since everything in Stencil is async and lazy loaded by default, it is important to NOT have any hard import statements linking components together.

https://stenciljs.com/docs/stencil-config

So what I understand for now is to include a <script src="build/vendor.js"></script> alongside with all needed 3rd party libraries.

I was briefly thinking of a utility item in the stencil.config.js like vendor: true, that will automatically strip out all imports coming from node_modules (except @stencil/**), tree-shake them and pack it into a vendor.js.
I'm too fresh into stencil to know if that's the way stencil should go in the future.

@jgw96
Copy link
Contributor

jgw96 commented Aug 29, 2017

Hello all! I am going to close this as a duplicate of #98. Thanks for being an early adopter of Stencil!

@jgw96 jgw96 closed this as completed Aug 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants