adminforth 2.25.0-test.3 → 2.25.0-test.5
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.
|
@@ -26,7 +26,7 @@ Open `schema.prisma` and change schema as needed: add new tables, columns, etc (
|
|
|
26
26
|
Run the following command to generate a new migration and apply it instantly in local database:
|
|
27
27
|
|
|
28
28
|
```bash
|
|
29
|
-
pnpm makemigration --
|
|
29
|
+
pnpm makemigration --name <name_of_changes>
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
Your colleagues will need to pull the changes and run `pnpm migrate:local` to apply the migration in their local database.
|
package/dist/spa/vite.config.ts
CHANGED
|
@@ -15,46 +15,6 @@ async function getNextAvailablePort(startPort: number | undefined) {
|
|
|
15
15
|
return await portfinder.getPortPromise({ port: startPort });
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
function ignoreTailwindErrors(): Plugin {
|
|
19
|
-
return {
|
|
20
|
-
name: 'ignore-tailwind-errors',
|
|
21
|
-
configureServer(server) {
|
|
22
|
-
server.middlewares.use((req, res, next) => {
|
|
23
|
-
const originalWrite = res.write;
|
|
24
|
-
res.write = function(chunk) {
|
|
25
|
-
if (typeof chunk === 'string' && chunk.includes('tailwind')) {
|
|
26
|
-
return true;
|
|
27
|
-
}
|
|
28
|
-
return originalWrite.call(this, chunk);
|
|
29
|
-
};
|
|
30
|
-
next();
|
|
31
|
-
});
|
|
32
|
-
},
|
|
33
|
-
config(config, { command }) {
|
|
34
|
-
if (command === 'build') {
|
|
35
|
-
// Override PostCSS config for build
|
|
36
|
-
config.css = config.css || {};
|
|
37
|
-
config.css.postcss = {
|
|
38
|
-
plugins: [
|
|
39
|
-
{
|
|
40
|
-
postcssPlugin: 'ignore-tailwind-errors',
|
|
41
|
-
Once(root, helpers) {
|
|
42
|
-
try {
|
|
43
|
-
return tailwindcss()(root, helpers);
|
|
44
|
-
} catch (error: any) {
|
|
45
|
-
console.warn('TailwindCSS warning ignored:', error.message);
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
]
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
58
18
|
const appPort = await getNextAvailablePort(5173);
|
|
59
19
|
const hmrPort = await getNextAvailablePort(5273);
|
|
60
20
|
console.log(`SPA port: ${appPort}. HMR port: ${hmrPort}`);
|
|
@@ -89,6 +49,25 @@ export default defineConfig({
|
|
|
89
49
|
return id.toString().split('node_modules/')[1].split('/')[0].toString();
|
|
90
50
|
}
|
|
91
51
|
},
|
|
52
|
+
|
|
53
|
+
// by default servers doesnt returns dotfiles
|
|
54
|
+
// so if we'll generate file with name like ".pnpm-BLnlxqcJ.js"
|
|
55
|
+
// it won't be loaded
|
|
56
|
+
entryFileNames: (chunkInfo) => {
|
|
57
|
+
return chunkInfo.name?.startsWith('.pnpm')
|
|
58
|
+
? chunkInfo.name.replace(/^\.pnpm/, 'pnpm') + '.js'
|
|
59
|
+
: '[name]-[hash].js'
|
|
60
|
+
},
|
|
61
|
+
chunkFileNames: (chunkInfo) => {
|
|
62
|
+
return chunkInfo.name?.startsWith('.pnpm')
|
|
63
|
+
? chunkInfo.name.replace(/^\.pnpm/, 'pnpm') + '.js'
|
|
64
|
+
: '[name]-[hash].js'
|
|
65
|
+
},
|
|
66
|
+
assetFileNames: (assetInfo) => {
|
|
67
|
+
return assetInfo.name?.startsWith('.pnpm')
|
|
68
|
+
? assetInfo.name.replace(/^\.pnpm/, 'pnpm')
|
|
69
|
+
: '[name]-[hash][extname]'
|
|
70
|
+
}
|
|
92
71
|
},
|
|
93
72
|
},
|
|
94
73
|
},
|