Bump @babel/core, @babel/eslint-parser, @babel/plugin-transform-runtime, and @babel/runtime to ^8.x. Remove useESModules and regenerator options from @babel/plugin-transform-runtime config (both removed in Babel 8). Switch @babel/eslint-parser import from the removed /experimental-worker entry point to the main entry point. Bump vite to ^8.0.0 (now using Rolldown/Oxc instead of esbuild/Rollup). Bump @rollup/plugin-babel to ^7.1.0 and babel-plugin-ember-template-compilation to ^4.0.0. Patch ember-concurrency@5.2.0 to remove the api.assertVersion(7) call that is incompatible with Babel 8 (ember-concurrency has not yet released a Babel 8-compatible version).
49 lines
1.2 KiB
JavaScript
49 lines
1.2 KiB
JavaScript
import { dirname } from 'node:path';
|
|
import { fileURLToPath } from 'node:url';
|
|
import { setConfig } from '@warp-drive/core/build-config';
|
|
import { buildMacros } from '@embroider/macros/babel';
|
|
import asyncArrowTaskTransform from 'ember-concurrency/async-arrow-task-transform';
|
|
|
|
console.log('Babel config loading, plugin:', typeof asyncArrowTaskTransform);
|
|
|
|
const macros = buildMacros({
|
|
configure: (config) => {
|
|
setConfig(config, {
|
|
// for universal apps this MUST be at least 5.6
|
|
compatWith: '5.6',
|
|
});
|
|
},
|
|
});
|
|
|
|
export default {
|
|
plugins: [
|
|
asyncArrowTaskTransform,
|
|
[
|
|
'babel-plugin-ember-template-compilation',
|
|
{
|
|
compilerPath: 'ember-source/ember-template-compiler/index.js',
|
|
transforms: [...macros.templateMacros],
|
|
},
|
|
],
|
|
[
|
|
'module:decorator-transforms',
|
|
{
|
|
runtime: {
|
|
import: import.meta.resolve('decorator-transforms/runtime-esm'),
|
|
},
|
|
},
|
|
],
|
|
[
|
|
'@babel/plugin-transform-runtime',
|
|
{
|
|
absoluteRuntime: dirname(fileURLToPath(import.meta.url)),
|
|
},
|
|
],
|
|
...macros.babelMacros,
|
|
],
|
|
|
|
generatorOpts: {
|
|
compact: false,
|
|
},
|
|
};
|