Fix build script to use ES modules instead of CommonJS
Some checks failed
Build and Push Docker Images / docker (push) Failing after 2m13s
Some checks failed
Build and Push Docker Images / docker (push) Failing after 2m13s
Convert inject-sw-version.js to ES module syntax since package.json has "type": "module". This fixes the build error in Docker. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
a279bb6aa9
commit
207fb261e6
@ -6,9 +6,13 @@
|
||||
* to force cache invalidation on new deployments
|
||||
*/
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const { execFileSync } = require('child_process');
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import { execFileSync } from 'child_process';
|
||||
import { fileURLToPath } from 'url';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
|
||||
const SW_SOURCE = path.join(__dirname, '..', 'public', 'sw.js');
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user