I created an Angular 2 project using the Angular 2 CLI and used the ng build --prod and got no errors.
When I upload the dist folder to my site, I get the following error when downloading the application:

Uncaught TypeError: this._input.charCodeAt is not a function_Tokenizer._advance @ main .688167 cā¦.bundle.js: 1716 _Tokenizer @ main .688167 cā¦.bundle.js: 1716 tokenize @ main .688167 cā¦.bundle.js: 1709 Parser.parse @ main .688167 cā¦.bundle.js: 219 HtmlParser.parse @ main .688167 cā¦.bundle.js: 380 DirectiveNormalizer.normalizeLoadedTemplate @ main .688167 cā¦.bundle.js: 598 DirectiveNormalizer.normalizeTemplateSync @ main .688167 cā¦.bundle.js: 598 DirectiveNormalizer.normalizeDirective @ main .688167 cā¦.bundle.js: 598 RuntimeCompiler._createCompiledTemplate @ main .688167 cā¦.bundle.js: 1090(anonymous function) @ main .688167 cā¦.bundle.js: 1090(anonymous function) @ main .688167 cā¦.bundle.js: 1090 RuntimeCompiler._compileComponents @ main .688167 cā¦.bundle.js: 1090 RuntimeCompiler._compileModuleAndComponents @ main .688167 cā¦.bundle.js: 1090 RuntimeCompiler.compileModuleAsync @ main .688167 cā¦.bundle.js: 1090 PlatformRef_._bootstrapModuleWithZone @ main .688167 cā¦.bundle.js: 717 PlatformRef_.bootstrapModule @ main .688167 cā¦.bundle.js: 717(anonymous function) @ main .688167 cā¦.bundle.js: 1509 __webpack_require__ @ inline.js: 1(anonymous function) @ main .688167 cā¦.bundle.js: 2131 __webpack_require__ @ inline.js: 1 window.webpackJsonp @ inline.js: 1(anonymous function) @ main .688167 cā¦.bundle.js: 1
I am using the latest Angular 2 CLI with webpack and Angular 2 RC.7
What could have gone wrong?
this._input.charCodeAt used only in the Angular compiler folder, as shown below: 
angular webpack
Theunreal
source share