create-wordpress-theme-ts 1.0.1 → 1.0.2
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.
package/package.json
CHANGED
|
Binary file
|
|
@@ -4,7 +4,7 @@ Theme URI: https://example.com/
|
|
|
4
4
|
Author: Your Name
|
|
5
5
|
Author URI: https://example.com/
|
|
6
6
|
Description: A custom WordPress theme built with React, TypeScript, and Vite
|
|
7
|
-
Version: 1.0.
|
|
7
|
+
Version: 1.0.0
|
|
8
8
|
License: GNU General Public License v2 or later
|
|
9
9
|
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
|
10
10
|
Text Domain: my-wp-theme
|
package/template/vite.config.ts
CHANGED
|
@@ -35,6 +35,7 @@ export default defineConfig(({ mode }) => ({
|
|
|
35
35
|
outDir: 'dist',
|
|
36
36
|
emptyOutDir: true,
|
|
37
37
|
sourcemap: mode === 'production', // Generate source maps for production
|
|
38
|
+
cssCodeSplit: false, // Extract all CSS into a single file
|
|
38
39
|
rollupOptions: {
|
|
39
40
|
input: resolve(__dirname, 'index.html'),
|
|
40
41
|
output: {
|
|
@@ -43,10 +44,10 @@ export default defineConfig(({ mode }) => ({
|
|
|
43
44
|
chunkFileNames: '[name].js', // For any code-split chunks (if any)
|
|
44
45
|
// For assets like images, fonts
|
|
45
46
|
assetFileNames: (assetInfo) => {
|
|
46
|
-
//
|
|
47
|
+
// Output bundled CSS as bundle.css (separate from WordPress theme's style.css)
|
|
47
48
|
const name = assetInfo.names?.[0] || '';
|
|
48
49
|
if (name.endsWith('.css')) {
|
|
49
|
-
return '
|
|
50
|
+
return 'bundle.css';
|
|
50
51
|
}
|
|
51
52
|
return 'assets/[name][extname]';
|
|
52
53
|
},
|