moxystudio / webpack-isomorphic-compiler-reporter

Beautiful reporting for webpack-isomorphic-compiler compilation events
MIT License
7 stars 1 forks source link

Incorrect warning about human error #15

Closed braska closed 6 years ago

braska commented 6 years ago

Feature introduced in #11 potentially wrong. I have 2 webpack configs: First one: for building only one file called render.js. This file exports function that accepts req, call renderToString (with <App /> as argument) and returns Promise. I can require this builded file on server-side and execute function from this file on each request.

Second config: have multiple entry points (manifest.js, main.js, vendor.js). All builded files will be used by <script /> tag.

I haven't any reasons to place render.js to the same directory as main.js and other client-side files. More over, I don't want to expose render.js for public access from web. But because of my web-server serve files from directory where main.js placed, render.js can be served too.

satazor commented 6 years ago

You are right. We probably overlooked that check because it suits our own way of making things.

We can either change humanErrors option to be a boolean or an object that gives you more control over what is checked. Alternatively we can revert that change.

@andrefgneves @andregoncalvesdev What's your opinion?

satazor commented 6 years ago

I'm leaned towars creating two new packages: webpack-sane-compiler-checker and webpack-isomorphic-compiler-checker. Those packages will have options allowing for fine grained control over what is checked. In this approach, the reporter will no longer have this built-in.

andrefgneves commented 6 years ago

I think that makes sense.