File tree Expand file tree Collapse file tree 2 files changed +17
-7
lines changed Expand file tree Collapse file tree 2 files changed +17
-7
lines changed Original file line number Diff line number Diff line change 1
- const {
1
+ import { createRequire } from 'module' ;
2
+ import { fileURLToPath } from 'url' ;
3
+
4
+ import {
2
5
babelCompatSupport ,
3
6
templateCompatSupport ,
4
- } = require ( '@embroider/compat/babel' ) ;
7
+ } from '@embroider/compat/babel' ;
8
+
9
+ const require = createRequire ( import . meta. url ) ;
5
10
6
- module . exports = {
11
+ export default {
7
12
plugins : [
8
13
[
9
14
'babel-plugin-ember-template-compilation' ,
@@ -28,7 +33,7 @@ module.exports = {
28
33
[
29
34
'@babel/plugin-transform-runtime' ,
30
35
{
31
- absoluteRuntime : __dirname ,
36
+ absoluteRuntime : fileURLToPath ( new URL ( '.' , import . meta . url ) ) ,
32
37
useESModules : true ,
33
38
regenerator : false ,
34
39
} ,
Original file line number Diff line number Diff line change 1
- const {
1
+ import { createRequire } from 'module' ;
2
+ import { fileURLToPath } from 'url' ;
3
+
4
+ import {
2
5
babelCompatSupport ,
3
6
templateCompatSupport ,
4
- } = require ( '@embroider/compat/babel' ) ;
7
+ } from '@embroider/compat/babel' ;
8
+
9
+ const require = createRequire ( import . meta. url ) ;
5
10
6
11
module . exports = {
7
12
plugins : [
@@ -36,7 +41,7 @@ module.exports = {
36
41
[
37
42
'@babel/plugin-transform-runtime' ,
38
43
{
39
- absoluteRuntime : __dirname ,
44
+ absoluteRuntime : fileURLToPath ( new URL ( '.' , import . meta . url ) ) ,
40
45
useESModules : true ,
41
46
regenerator : false ,
42
47
} ,
You can’t perform that action at this time.
0 commit comments