🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@kucrut/vite-for-wp

Package Overview
Dependencies
Maintainers
0
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kucrut/vite-for-wp - npm Package Compare versions

Comparing version

to
0.11.0

29

package.json
{
"name": "@kucrut/vite-for-wp",
"version": "0.10.0",
"version": "0.11.0",
"description": "Vite integration for WordPress plugins and themes development.",

@@ -22,20 +22,18 @@ "author": "Dzikri Aziz",

"devDependencies": {
"@changesets/cli": "^2.27.11",
"@eslint/js": "^9.17.0",
"@kucrut/eslint-config": "^0.3.2",
"@changesets/cli": "^2.28.1",
"@eslint/js": "^9.21.0",
"@kucrut/eslint-config": "^0.3.3",
"@types/eslint": "^9.6.1",
"@types/node": "^22.10.2",
"dts-buddy": "^0.5.4",
"eslint": "^9.17.0",
"globals": "^15.13.0",
"@types/node": "^22.13.9",
"dts-buddy": "^0.5.5",
"eslint": "^9.21.0",
"globals": "^16.0.0",
"rollup-plugin-external-globals": "^0.13.0",
"typescript": "5.7.2",
"typescript-eslint": "^8.18.1",
"vite": "^6.0.3",
"vite-plugin-external": "^4.0.1"
"typescript": "~5.7.3",
"typescript-eslint": "^8.26.0",
"vite": "^6.2.1"
},
"peerDependencies": {
"rollup-plugin-external-globals": "^0.13.0",
"vite": "^6.0.3",
"vite-plugin-external": "^4.0.1"
"vite": "^6.2.1"
},

@@ -45,5 +43,2 @@ "peerDependenciesMeta": {

"optional": true
},
"vite-plugin-external": {
"optional": true
}

@@ -50,0 +45,0 @@ },

@@ -137,6 +137,6 @@ # Vite for WordPress

If your package depends on one or more scripts registered by WordPress (eg. `jquery`, `react`, `@wordpress/i18n`, etc.) and you want to exclude them from the final build, add `wp_scripts()` to the list of Vite's plugins. But first, install the required dependencies:
If your package depends on one or more scripts registered by WordPress (eg. `jquery`, `react`, `@wordpress/i18n`, etc.) and you want to exclude them from the final build, add `wp_scripts()` to the list of Vite's plugins. But first, install the required dependency:
```sh
npm add -D rollup-plugin-external-globals vite-plugin-external
npm add -D rollup-plugin-external-globals
```

@@ -143,0 +143,0 @@

@@ -19,3 +19,4 @@ import { wp_globals } from '../utils/wp-globals.js';

* @since 0.7.0
* @since 0.8.0 Import dependencies dynamically.
* @since 0.8.0 Import dependencies dynamically.
* @since 0.11.0 Remove vite-plugin-external dependency.
*

@@ -27,4 +28,3 @@ * @type {(options?: WPScriptsOptions) => Plugin}

export async function wp_scripts( options = {} ) {
const { default: externals } = await import( 'vite-plugin-external' );
const { default: globals } = await import( 'rollup-plugin-external-globals' );
const { default: external_globals } = await import( 'rollup-plugin-external-globals' );

@@ -59,7 +59,4 @@ const { extraScripts = {} } = options;

plugin,
externals( {
externals: scripts,
} ),
globals( scripts ),
external_globals( scripts ),
];
}