forked from emberjs/ember.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbabel.test.config.mjs
35 lines (29 loc) · 900 Bytes
/
babel.test.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
This babel config governs Ember's test suite. It transpiles some things that
our published build should not (because those things are left for apps to
decide).
See babel.config.mjs for the base config that's used for building for
publication.
*/
import { createRequire } from 'node:module';
import vmBabelPlugins from '@glimmer/vm-babel-plugins';
import baseConfig from './babel.config.mjs';
const require = createRequire(import.meta.url);
const buildDebugMacroPlugin = require('./broccoli/build-debug-macro-plugin.js');
const isProduction = process.env.EMBER_ENV === 'production';
export default {
...baseConfig,
presets: [
[
'@babel/preset-env',
{
targets: require('./config/targets.js'),
},
],
],
plugins: [
...baseConfig.plugins,
buildDebugMacroPlugin(!isProduction),
...vmBabelPlugins({ isDebug: !isProduction }),
],
};