Skip to content

Commit 8d4bb26

Browse files
committed
Allow modules with template literals
1 parent 4718f4b commit 8d4bb26

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

Diff for: package.json

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
"@babel/plugin-proposal-object-rest-spread": "^7.18.0",
5050
"@babel/plugin-proposal-optional-chaining": "^7.17.12",
5151
"@babel/plugin-transform-object-assign": "^7.16.7",
52+
"@babel/plugin-transform-template-literals": "^7.18.9",
5253
"@babel/polyfill": "^7.12.1",
5354
"@babel/preset-env": "^7.18.2",
5455
"@babel/preset-react": "^7.17.12",

Diff for: webpack.config.js

+15
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,21 @@ const clientConfig = ({ isDevClientWrapper }) => ({
127127
resolve: {
128128
fullySpecified: false,
129129
},
130+
use: [
131+
{
132+
// Fix #157 Issue with template literals in firebase module
133+
loader: 'babel-loader',
134+
options: {
135+
compact: false,
136+
plugins: [
137+
'@babel/plugin-transform-template-literals',
138+
!isProd &&
139+
!isDevClientWrapper &&
140+
require.resolve('react-refresh/babel'),
141+
].filter(Boolean),
142+
},
143+
},
144+
],
130145
},
131146
// typescript config
132147
{

0 commit comments

Comments
 (0)