@rahul_ur/devlink-vite-plugin 1.0.0 → 1.0.1
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 +2 -2
- package/src/index.mjs +7 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rahul_ur/devlink-vite-plugin",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Vite plugin that wires devlink-babel-plugin into Vite+React automatically",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.mjs",
|
|
@@ -23,6 +23,6 @@
|
|
|
23
23
|
"license": "MIT",
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"vite": ">=4.0.0",
|
|
26
|
-
"devlink-babel-plugin": ">=1.0.0"
|
|
26
|
+
"@rahul_ur/devlink-babel-plugin": ">=1.0.0"
|
|
27
27
|
}
|
|
28
28
|
}
|
package/src/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ const _require = createRequire(import.meta.url);
|
|
|
5
5
|
/**
|
|
6
6
|
* devlinkVitePlugin()
|
|
7
7
|
*
|
|
8
|
-
* Adds devlink-babel-plugin to Vite's React Babel transform automatically.
|
|
8
|
+
* Adds @rahul_ur/devlink-babel-plugin to Vite's React Babel transform automatically.
|
|
9
9
|
* Drop into vite.config.ts plugins array — no other config needed.
|
|
10
10
|
*
|
|
11
11
|
* @param {object} options
|
|
@@ -25,12 +25,12 @@ export function devlinkVitePlugin(options = {}) {
|
|
|
25
25
|
// Resolve the babel plugin path at config time
|
|
26
26
|
let pluginPath;
|
|
27
27
|
try {
|
|
28
|
-
pluginPath = _require.resolve('devlink-babel-plugin');
|
|
28
|
+
pluginPath = _require.resolve('@rahul_ur/devlink-babel-plugin');
|
|
29
29
|
} catch {
|
|
30
30
|
// If not installed yet, warn and skip gracefully
|
|
31
31
|
console.warn(
|
|
32
|
-
'[devlink-vite-plugin] devlink-babel-plugin not found. ' +
|
|
33
|
-
'Run: npm install -D devlink-babel-plugin'
|
|
32
|
+
'[devlink-vite-plugin] @rahul_ur/devlink-babel-plugin not found. ' +
|
|
33
|
+
'Run: npm install -D @rahul_ur/devlink-babel-plugin'
|
|
34
34
|
);
|
|
35
35
|
return { name: 'devlink-vite-plugin-noop' };
|
|
36
36
|
}
|
|
@@ -72,7 +72,7 @@ export function devlinkVitePlugin(options = {}) {
|
|
|
72
72
|
* Usage in vite.config.ts:
|
|
73
73
|
*
|
|
74
74
|
* import react from '@vitejs/plugin-react'
|
|
75
|
-
* import { devlinkBabelConfig } from 'devlink-vite-plugin'
|
|
75
|
+
* import { devlinkBabelConfig } from '@rahul_ur/devlink-vite-plugin'
|
|
76
76
|
*
|
|
77
77
|
* export default defineConfig({
|
|
78
78
|
* plugins: [
|
|
@@ -94,9 +94,9 @@ export function devlinkBabelConfig(options = {}) {
|
|
|
94
94
|
|
|
95
95
|
let pluginPath;
|
|
96
96
|
try {
|
|
97
|
-
pluginPath = _require.resolve('devlink-babel-plugin');
|
|
97
|
+
pluginPath = _require.resolve('@rahul_ur/devlink-babel-plugin');
|
|
98
98
|
} catch {
|
|
99
|
-
console.warn('[devlink-vite-plugin] devlink-babel-plugin not found.');
|
|
99
|
+
console.warn('[devlink-vite-plugin] @rahul_ur/devlink-babel-plugin not found.');
|
|
100
100
|
return null;
|
|
101
101
|
}
|
|
102
102
|
|