# Sprockets replacements and code splitting

**URL:** https://meta.discourse.org/t/sprockets-replacements-and-code-splitting/90930
**Category:** Development
**Created:** [June 28, 2018, 8:44am UTC](https://meta.discourse.org/t/sprockets-replacements-and-code-splitting/90930 "2018-06-28T08:44:00Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![misaka4e21](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@misaka4e21](https://meta.discourse.org/u/misaka4e21)
#### Post date: [June 28, 2018, 8:44am UTC](https://meta.discourse.org/t/sprockets-replacements-and-code-splitting/90930/1 "2018-06-28T08:44:00Z")

</div>

> [@Revisiting moving to TypeScript](https://meta.discourse.org/t/revisiting-moving-to-typescript/60519/3):
>
> Since then (two years really flies by!) I have had the opportunity to play with TypeScript a bit more and I can say that I am quite a fan. I would not suggest it for everything in Discourse, but there are parts of the codebase where stronger typing would certainly help from a development perspective. I consider TypeScript something like a super linter, where you can avoid null exceptions and accessing members that aren’t there. The big problem right now is the pipeline doesn’t support it. Our …

Is there still any plan to replace sprockets, the current assets-building pipeline with another one that supports code splitting such as webpack? It seems that an all-in-one bundle of all JavaScript files, rather than needed files split by routes, may hurt page-loading performance.

I’ve tried webpacker which integrated webpack and Rails, but got nothing lucky. Discourse has its own AMD implementation which has been unable to access modules moved to webpack, making it impossible to use sprockets and webpack at the same time.
