diff --git a/package.json b/package.json index 82196fd..525a019 100644 --- a/package.json +++ b/package.json @@ -52,6 +52,7 @@ "@babel/plugin-proposal-object-rest-spread": "^7.18.0", "@babel/plugin-proposal-optional-chaining": "^7.17.12", "@babel/plugin-transform-object-assign": "^7.16.7", + "@babel/plugin-transform-template-literals": "^7.18.9", "@babel/polyfill": "^7.12.1", "@babel/preset-env": "^7.18.2", "@babel/preset-react": "^7.17.12", diff --git a/webpack.config.js b/webpack.config.js index b0835c7..41caf2d 100755 --- a/webpack.config.js +++ b/webpack.config.js @@ -135,6 +135,21 @@ const clientConfig = ({ isDevClientWrapper }) => ({ resolve: { fullySpecified: false, }, + use: [ + { + // Fix #157 Issue with template literals in firebase module + loader: 'babel-loader', + options: { + compact: false, + plugins: [ + '@babel/plugin-transform-template-literals', + !isProd && + !isDevClientWrapper && + require.resolve('react-refresh/babel'), + ].filter(Boolean), + }, + }, + ], }, // typescript config {