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

metadata fails when referenced chunks don't have CSS dependencies #543

Closed
tivac opened this issue Jan 18, 2019 · 0 comments · Fixed by #544
Closed

metadata fails when referenced chunks don't have CSS dependencies #543

tivac opened this issue Jan 18, 2019 · 0 comments · Fixed by #544
Assignees

Comments

@tivac
Copy link
Owner

tivac commented Jan 18, 2019

Expected Behavior

Writing out metadata should succeed, even if some of the chunks don't have any CSS dependencies.

Current Behavior

TypeError: Cannot read property 'dest' of undefined

Possible Solution

Filter the list of dependencies in rollup.js inside the if(options.meta) block so that only those that exist in out are used to create the array.

Steps to Reproduce (for bugs)

  1. Set meta : true in the rollup plugin
  2. Build a project that has chunks w/o CSS dependencies
  3. 🔥 💀

Context

Want to use metadata to rewrite chunks after a build to include their CSS automatically, but can't do that atm because the build fails.

Your Environment

Executable Version
modular-css v21.0.0
npm --version v6.5.0
node --version v10.12.0
OS Version
Windows 10 1607
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant