Open tomasvarg opened 6 years ago
By default SystemJS won't transpile all code, only code it deems to be ES module code.
Try adding:
System.config({
meta: {
'path-to-index-dir/*': { format: 'esm' }
}
});
Or just specifically for the index.js
even.
This works, thanks!
Do I get it right that's what the following note in systemjs/doc/module-format.md
states?
Note that ES6 modules are detected via the presence of import and export module syntax and no other features at all. This is because the transpilation applies to the module format specifically, not the language.
(I thought about adding a feature detection clarification in the plugin's readme.)
Yes exactly, if you'd like to clarify PR's welcome.
I'm not able to run anything needing transpilation even with the most basic configuration - attempt to run something ends with syntax error on
node_modules/systemjs/dist/system.src.js:2823:8
; when I try to logsource
param of thegetSource
function on this line I'm getting untranspiled code.index.html (only the relevant part):
system.config.js:
(Adding
baseURL
,defaultJSExtension
won't help)index.js
Exact stack trace:
versions (apart from
promise-polyfill
no other packages present):(Don't have any other old browser than IE11, sorry. Also tried to include various core-js polyfills.)
Am I missing something obvious?