Since Aurelia only really does the bare minimum polyfilling to get Aurelia running, I’d like to get @babel/preset-env
working. I keep running into core-js module issues that don’t make sense:
require.js:168 Uncaught Error: Module name "core-js/modules/es.array.reverse" has not been loaded yet for context: _. Use require([])
https://requirejs.org/docs/errors.html#notloaded
at makeError (require.js:168:1)
at Object.localRequire [as require] (require.js:1436:1)
at requirejs (require.js:1797:1)
at users.html:1:1
The define
call is in the vendor-bundle.js, but somehow it’s not available to the app-bundle in time for it’s ‘require’ call.
babel.config.json :
{
"presets": [
[
"@babel/preset-env",
{
"loose": true,
"exclude": [
"@babel/plugin-proposal-dynamic-import"
],
"useBuiltIns": "usage",
"corejs": "3.26.1",
"debug": true
}
]
],
"plugins": [
[
"@babel/plugin-proposal-decorators",
{
"legacy": true
}
],
[
"@babel/plugin-proposal-class-properties",
{
"loose": true
}
],
"@babel/plugin-syntax-dynamic-import"
]
}