royibernthal Posted November 20, 2016 Share Posted November 20, 2016 So far I've been developing my project using TypeScript and simply compiling it into JavaScript via VS Code. Is there any good reason for me to migrate to Webpack? Will it positively affect the code or structure in any way? Quote Link to comment Share on other sites More sharing options...
fenomas Posted November 20, 2016 Share Posted November 20, 2016 Webpack is primarily a module loader. If you're using Typescript, pulls in imported modules at compile time, so I'm not sure what webpack could do for you. Quote Link to comment Share on other sites More sharing options...
max123 Posted November 20, 2016 Share Posted November 20, 2016 Ditto. I stopped bothering with webpack the moment I switched to Typescript! Will never look back Quote Link to comment Share on other sites More sharing options...
royibernthal Posted November 20, 2016 Author Share Posted November 20, 2016 I see. I know for instance that Angular 2 uses Webpack even though it already uses TypeScript. Quote Link to comment Share on other sites More sharing options...
jellix Posted November 20, 2016 Share Posted November 20, 2016 I wouldn't use it if you don't need to. It is useful if you have to embed other code and if you want to pack it into a small js-file. But: It is another cycle after each compiling. I have to use typeScript and webPack in some projects and I think it's pretty annoying because of the time that is running after each compile process. TypeScript is great without any doubt! And it's okay for me to wait for the compiler. But to wait for webpack, too is a bit too much now. I'm also working on another projects that is javascript-based (no typescript) and without webpack. And I have to say: It feels much better just to reload the page in the browser without waiting for the code to be compiled. So I will think for every project if I have to use TypeScript and Webpack (and grunt) Quote Link to comment Share on other sites More sharing options...
bruno_ Posted November 20, 2016 Share Posted November 20, 2016 Do you see any advantage in using webpack? like smaller file size, better code management, or faster loading or execution of the game? If you don't see any of this, or other thing that makes developing your game better or easier there's no point in using another tool. Quote Link to comment Share on other sites More sharing options...
fenomas Posted November 20, 2016 Share Posted November 20, 2016 Webpack isn't an optimizer that makes your code lighter or faster. It's a dependency wrangler. If your JS declares dependencies (e.g. on commonJS modules, on images, CSS, whatever), then webpack can parse those dependencies and pack up all the necessary files and modules for deployment. If you don't need a tool to do that, I don't think you need to consider using webpack. Quote Link to comment Share on other sites More sharing options...
royibernthal Posted November 20, 2016 Author Share Posted November 20, 2016 I got my answer, thanks everybody. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.