- Install tailwindcss, @tailwindcss/postcss, clsx, tailwind-merge, class-variance-authority - Install @hugeicons/react for icons - Install Radix UI primitives (switch, tabs, label, separator, select, dialog, checkbox, dropdown-menu, popover) - Install sonner for toast notifications - Create postcss.config.js with Tailwind v4 PostCSS plugin - Create jsconfig.json with @ path alias for src/admin - Create components.json for shadcn configuration - Update webpack.config.js with @ resolve alias - Create globals.css with Tailwind v4 CSS-first config + shadcn CSS variables - Create cn() utility in lib/utils.js - Create 17 shadcn UI components (button, input, label, checkbox, switch, tabs, alert, separator, badge, textarea, dialog, sonner, table, skeleton, select, dropdown-menu, popover) - Create async confirm() utility replacing SweetAlert2 - Create toast utility wrapping sonner
22 lines
544 B
JavaScript
22 lines
544 B
JavaScript
const defaultConfig = require('@wordpress/scripts/config/webpack.config');
|
|
const path = require('path');
|
|
|
|
module.exports = {
|
|
...defaultConfig,
|
|
entry: {
|
|
'admin': './src/admin/index.js',
|
|
},
|
|
output: {
|
|
path: path.resolve(__dirname, 'build'),
|
|
filename: '[name].js',
|
|
chunkFilename: '[name].[contenthash].js',
|
|
},
|
|
resolve: {
|
|
...defaultConfig.resolve,
|
|
alias: {
|
|
...defaultConfig.resolve.alias,
|
|
'@': path.resolve(__dirname, 'src/admin'),
|
|
},
|
|
},
|
|
};
|