Skip to content

Commit 3a58526

Browse files
glenneenuchi
authored andcommitted
Allow modules with template literals
1 parent 8265933 commit 3a58526

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
"@babel/plugin-proposal-object-rest-spread": "^7.18.0",
5353
"@babel/plugin-proposal-optional-chaining": "^7.17.12",
5454
"@babel/plugin-transform-object-assign": "^7.16.7",
55+
"@babel/plugin-transform-template-literals": "^7.18.9",
5556
"@babel/polyfill": "^7.12.1",
5657
"@babel/preset-env": "^7.18.2",
5758
"@babel/preset-react": "^7.17.12",

webpack.config.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,21 @@ const clientConfig = ({ isDevClientWrapper }) => ({
135135
resolve: {
136136
fullySpecified: false,
137137
},
138+
use: [
139+
{
140+
// Fix #157 Issue with template literals in firebase module
141+
loader: 'babel-loader',
142+
options: {
143+
compact: false,
144+
plugins: [
145+
'@babel/plugin-transform-template-literals',
146+
!isProd &&
147+
!isDevClientWrapper &&
148+
require.resolve('react-refresh/babel'),
149+
].filter(Boolean),
150+
},
151+
},
152+
],
138153
},
139154
// typescript config
140155
{

0 commit comments

Comments
 (0)