These are chat archives for systemjs/systemjs

13th
Apr 2017
Tim Fish
@timfish
Apr 13 2017 11:37
I'm bunding an app using aurelia-bundler which in turn uses systemjs-builder. When I set minify:true SystemJS cant load the bundle and says: Error: (SystemJS) Unable to dynamically transpile ES module as SystemJS.transpiler set to false.
how does SystemJS detect ES6 and decide that it should be transpiling it? My code is already TypeScript > ES5 transpiled before bundling
and this issue only occurs when minifying
Nick George
@Izzmo
Apr 13 2017 13:14
@timfish what is your transpiler set as? Are you bundling the runtime in it?
I personally use traceur and IIRC back in the day I got that error when the runtime wasn't present when bundling for production use.
Tim Fish
@timfish
Apr 13 2017 14:52
I'm not using a transpiler. I'm using the typescript compiler to go to ES5
and bundling works fine when I'm not minifying
In development I'm not bundling and just using tsc --watch
SystemJS is for some reason detecting the bundled minifed output as ES6 (or at least non-ES5) and is attempting to transpile it but gives up there as I have transpilation disabled
Nick George
@Izzmo
Apr 13 2017 14:56
What environment are you using it in, node or web?
Tim Fish
@timfish
Apr 13 2017 14:56
electron, so both
but this is in the web side
Nick George
@Izzmo
Apr 13 2017 14:57
Are you targeting the same file no matter if it's compiled output vs. bundled? So .. say file1.js from tsc --watch and file1.js after bundling as well?
Tim Fish
@timfish
Apr 13 2017 14:59
no, compiled output is hundreds of files, bundled output goes into a single app-build.js
its just strange that bundling works fine until minify is enabled
I've even tried setting mangle: false
This issue makes it look like there's a way to override the detection: systemjs/systemjs#969
Tim Fish
@timfish
Apr 13 2017 15:08
it would still be nice if it told me exactly why it had been detected!