@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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/postinstall.js +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@necrolab/dashboard",
3
- "version": "0.4.43",
3
+ "version": "0.4.44",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": "rm -rf dist && vite build && npx workbox-cli generateSW workbox-config.cjs",
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 dist
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) {