Skip to content

Commit

Permalink
fix: Use ES export for analytics.js (#49)
Browse files Browse the repository at this point in the history
Replaced CommonJS module export with ES export in `analytics.js` to ensure compatibility with the project setup.
  • Loading branch information
warnyul authored Nov 28, 2024
1 parent c6f0e8b commit 471b9f0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 1 addition & 4 deletions src/js/analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,4 @@ const firebaseConfig = {
const app = initializeApp(firebaseConfig);

// Initialize Analytics and get a reference to the service
const analytics = getAnalytics(app);

// Export analytics
module.exports = analytics;
export const analytics = getAnalytics(app);
3 changes: 2 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ const context = path.join(__dirname, 'src');
const outputDir = path.join(__dirname, 'dist');

module.exports = {
mode: "production",
mode: "production",
entry: {
index: './src/js/index.js',
pageNotFound: './src/js/404.js',
},
output: {
path: outputDir,
publicPath: '',
filename: '[name].[contenthash:8].js',
sourceMapFilename: '[name].[contenthash:8].js.map',
chunkFilename: '[id].[contenthash:8].js',
Expand Down

0 comments on commit 471b9f0

Please sign in to comment.