Completes the "skinned vs. replaced" conversion started with Posts — every native list-table screen the user asked about now has a genuine custom Vue page behind it instead of dark-themed CSS over the native markup. All three follow the same pattern as Posts: own REST controller in admin/src/Rest/, own Vue page matching the Comments layout, native screen redirected away (direct visits too, not just the sidebar link), gated by its own Settings toggle defaulting to on. - Pages (PagesData.php + Pages.vue): same as Posts, parent page shown instead of categories. edit.php?post_type=page redirects; other post types untouched. - Media Library (MediaData.php + Media.vue): thumbnail grid with type filters (Images/Audio/Video/Documents/Unattached). Replaces the browse/library experience only — media-new.php (the actual upload screen) is untouched, same reasoning as leaving the block editor alone for Posts/Pages. - Users (UsersData.php + Users.vue): filterable by role. Deleting a user always reassigns their content to whoever performs the deletion rather than exposing WP core's reassign-or-delete-everything choice as a one-click action — deliberately simplified to avoid a surprising, highly destructive default. user-new.php untouched. Verified live: Media's grid renders real thumbnails/dimensions/file sizes with working filters and search; Users shows real accounts with role filters and correctly hides delete for the current user; both redirect correctly from their native URLs. Co-Authored-By: Claude Sonnet 5 <[email protected]>
47 lines
2.2 KiB
JavaScript
47 lines
2.2 KiB
JavaScript
import { defineConfig } from 'vite';
|
|
import vue from '@vitejs/plugin-vue';
|
|
import { fileURLToPath, URL } from 'node:url';
|
|
|
|
// Deliberately simple: one entry in this first slice (dashboard). Add more
|
|
// entries here as additional pages get rebuilt — same flat pattern each
|
|
// time, no shared scoping/theme-remap layer to keep in sync across files.
|
|
export default defineConfig({
|
|
root: fileURLToPath(new URL('./src', import.meta.url)),
|
|
plugins: [vue()],
|
|
resolve: {
|
|
alias: {
|
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
|
},
|
|
},
|
|
build: {
|
|
outDir: fileURLToPath(new URL('./dist', import.meta.url)),
|
|
emptyOutDir: true,
|
|
sourcemap: true,
|
|
manifest: true,
|
|
rollupOptions: {
|
|
input: {
|
|
shell: fileURLToPath(new URL('./src/entries/shell.js', import.meta.url)),
|
|
dashboard: fileURLToPath(new URL('./src/entries/dashboard.js', import.meta.url)),
|
|
settings: fileURLToPath(new URL('./src/entries/settings.js', import.meta.url)),
|
|
'menu-creator': fileURLToPath(new URL('./src/entries/menu-creator.js', import.meta.url)),
|
|
'admin-notices': fileURLToPath(new URL('./src/entries/admin-notices.js', import.meta.url)),
|
|
'role-editor': fileURLToPath(new URL('./src/entries/role-editor.js', import.meta.url)),
|
|
'activity-log': fileURLToPath(new URL('./src/entries/activity-log.js', import.meta.url)),
|
|
'database-explorer': fileURLToPath(new URL('./src/entries/database-explorer.js', import.meta.url)),
|
|
plugins: fileURLToPath(new URL('./src/entries/plugins.js', import.meta.url)),
|
|
comments: fileURLToPath(new URL('./src/entries/comments.js', import.meta.url)),
|
|
posts: fileURLToPath(new URL('./src/entries/posts.js', import.meta.url)),
|
|
pages: fileURLToPath(new URL('./src/entries/pages.js', import.meta.url)),
|
|
media: fileURLToPath(new URL('./src/entries/media.js', import.meta.url)),
|
|
users: fileURLToPath(new URL('./src/entries/users.js', import.meta.url)),
|
|
'locked-feature': fileURLToPath(new URL('./src/entries/locked-feature.js', import.meta.url)),
|
|
},
|
|
output: {
|
|
entryFileNames: '[name].[hash].js',
|
|
chunkFileNames: 'assets/[name].[hash].js',
|
|
assetFileNames: 'assets/[name].[hash][extname]',
|
|
},
|
|
},
|
|
},
|
|
});
|