@necrolab/dashboard 0.4.43 → 0.4.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/postinstall.js +3 -3
package/package.json
CHANGED
package/postinstall.js
CHANGED
|
@@ -31,7 +31,7 @@ if (fs.existsSync(localDistPath) && __dirname.includes("dashboard")) {
|
|
|
31
31
|
fs.renameSync(localDistPath, distPath);
|
|
32
32
|
console.log("📁 Moved dist folder");
|
|
33
33
|
|
|
34
|
-
// Copy service worker files from public to
|
|
34
|
+
// Copy service worker files from public to the same level as index.html
|
|
35
35
|
if (fs.existsSync(publicPath)) {
|
|
36
36
|
const swFiles = fs.readdirSync(publicPath).filter(file =>
|
|
37
37
|
file.endsWith('.js') && (file.startsWith('sw') || file.startsWith('workbox'))
|
|
@@ -39,9 +39,9 @@ if (fs.existsSync(localDistPath) && __dirname.includes("dashboard")) {
|
|
|
39
39
|
|
|
40
40
|
for (const file of swFiles) {
|
|
41
41
|
const sourcePath = path.join(publicPath, file);
|
|
42
|
-
const destPath = path.join(distPath, file);
|
|
42
|
+
const destPath = path.join(distPath, file); // Same level as index.html
|
|
43
43
|
fs.copyFileSync(sourcePath, destPath);
|
|
44
|
-
console.log(`📄 Copied ${file} to dist`);
|
|
44
|
+
console.log(`📄 Copied ${file} to dist root`);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
} catch (error) {
|