- Add package.json with @wordpress/scripts and React dependencies - Configure webpack for admin bundle output - Create src/admin directory structure (api, components, pages) - Implement API client with nonce handling (ajaxRequest, apiRequest) - Add API methods for orders, customers, products, forms, coupons, licenses - Create React App component with page routing - Add placeholder page components for all admin sections - Create ReactAdmin PHP class to manage asset enqueuing - Register ReactAdmin singleton in main plugin file - Bump version to 2.0.0 Build: Run 'npm install && npm run build' to generate assets
15 lines
361 B
JavaScript
15 lines
361 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',
|
|
},
|
|
};
|