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

Stats file only includes index.html #316

Closed
ForsakenHarmony opened this issue Aug 15, 2017 · 2 comments · Fixed by #398
Closed

Stats file only includes index.html #316

ForsakenHarmony opened this issue Aug 15, 2017 · 2 comments · Fixed by #398

Comments

@ForsakenHarmony
Copy link
Member

Do you want to request a feature or report a bug?
bug

What is the current behavior?
stats file only includes index.html

If the current behavior is a bug, please provide the steps to reproduce.
preact build --json

What is the expected behavior?
stats should include the whole bundle

Please mention other relevant information.

  • node version
    8.3.0
  • npm version
    5.3.0
  • Operating system
    Windows
  • preact cli
    1.4.1
@touchstoneis
Copy link

I experienced the same behavior as well. I don't have an answer, but if you are in a bind and need the stats, editing the following lines in 'node_modules/preact-cli/lib/lib/webpack/run-webpack.js' 'writeJsonStats' method worked for me:

..
//jsonStats = jsonStats.children && jsonStats.children[0] || jsonStats;

//jsonStats.modules.forEach(stripBabelLoaderFromModuleNames);
//jsonStats.chunks.forEach(c => c.modules.forEach(stripBabelLoaderFromModuleNames));

...

Hope that helps

@ForsakenHarmony
Copy link
Member Author

yup that works, thx

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.

3 participants