
Webpack 2, RC 4 - jfmercer
https://github.com/webpack/webpack/releases/tag/v2.2.0-rc.4
======
seniorsassycat
I recently setup a typescript > webpack project and I was really disappointed
with the dev-tools debugging experience.

Webpack renames imported bindings, so

    
    
            import {foo} from './bar';
    

becomes something like this

    
    
            let __webpack_require_foo_bar = _webpack_modules[5 /* foo */].bar;
    

So if you are paused in the debugger and want to use foo in a watch statement,
or use it in a computation you'll have to reference the real source instead of
the source maps.

I found questions on SO, and it seems like a known and accepted problem, but I
know I won't be able to sell my team on Webpack because of this.

~~~
dvcc
Doesn't this have more to do with Babel and less to do with Webpack? I think
this originates with how Babel treats ES6 Modules differently from CommonJS,
and if you were to instead do:

    
    
      const foo = require('./bar').foo
    

it would keep the name the same?

EDIT: [https://github.com/jamietre/babel-plugin-transform-
es2015-mo...](https://github.com/jamietre/babel-plugin-transform-
es2015-modules-commonjs-simple)

There is a better explanation with a _partial solution_.

~~~
jamra
Typescript doesn't need babel since the typescript compiler supports es6.

~~~
dvcc
The 'let' should have made me re-think the problem.

------
jfmercer
According to sokra, this ought to be the final rc. From the release notes:
"This is probably the last RC. We released it as final test. If no critial
bugs are discovered, we release 2.2.0 in < 10 days."

------
k__
I tried the dynamic import/require once and it was really nice.

I could just write a normal SPA and require some stuff in every route, so the
client only downloads the code that is used for the current page and things
worked fine without extras needed.

~~~
simplify
That almost sounds like server-side rendering :)

~~~
patates
But SSR means you send everything around the content again and again.

~~~
simplify
If each page has different dependencies, you're not sending much duplicate
content. Also, SSR supports incremental rendering (due to HTTP streaming),
something that is currently impossible to do with SPAs.

See this article for more detail: [https://jakearchibald.com/2016/fun-hacks-
faster-content/](https://jakearchibald.com/2016/fun-hacks-faster-content/)

------
VMG
Aaaand github unicorns..

~~~
vanni
"We are currently experiencing major service outages."

[https://twitter.com/githubstatus/status/819940738452615168](https://twitter.com/githubstatus/status/819940738452615168)

Hilarious replies on Twitter.

------
AznHisoka
Looks like there is some connectivity issues in OVH as well.. not sure if
related?

