vite-plugin-rnw 0.0.1 → 0.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/README.md +2 -2
- package/dist/index.cjs +3 -4
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ A vite plugin for React Native Web projects. (edited from a version of the react
|
|
|
10
10
|
```js
|
|
11
11
|
// vite.config.js
|
|
12
12
|
import { defineConfig } from "vite";
|
|
13
|
-
import rnw from "vite-plugin-rnw";
|
|
13
|
+
import { rnw } from "vite-plugin-rnw";
|
|
14
14
|
|
|
15
15
|
export default defineConfig({
|
|
16
16
|
plugins: [rnw()],
|
|
@@ -25,7 +25,7 @@ Includes `.js`, `.jsx`, `.ts` & `.tsx` by default. This option can be used to ad
|
|
|
25
25
|
|
|
26
26
|
```js
|
|
27
27
|
import { defineConfig } from "vite";
|
|
28
|
-
import rnw from "vite-plugin-rnw";
|
|
28
|
+
import { rnw } from "vite-plugin-rnw";
|
|
29
29
|
|
|
30
30
|
export default defineConfig({
|
|
31
31
|
plugins: [rnw({ include: /\.(js|jsx|ts|tsx)$/ })],
|
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
1
|
//#region rolldown:runtime
|
|
3
2
|
var __create = Object.create;
|
|
4
3
|
var __defProp = Object.defineProperty;
|
|
@@ -151,7 +150,7 @@ const getInitialOptions = (opts) => {
|
|
|
151
150
|
optimizeDeps: "rolldownVersion" in vite ? { rollupOptions: { jsx: { mode: "automatic" } } } : { esbuildOptions: { jsx: "automatic" } }
|
|
152
151
|
};
|
|
153
152
|
};
|
|
154
|
-
function
|
|
153
|
+
function rnw(opts = {}) {
|
|
155
154
|
var _opts$babel;
|
|
156
155
|
const include = opts.include ?? defaultIncludeRE;
|
|
157
156
|
const exclude = opts.exclude ?? defaultExcludeRE;
|
|
@@ -350,7 +349,7 @@ function viteReactNativeWeb(opts = {}) {
|
|
|
350
349
|
viteReactRefresh
|
|
351
350
|
];
|
|
352
351
|
}
|
|
353
|
-
|
|
352
|
+
rnw.preambleCode = preambleCode;
|
|
354
353
|
const loadedPlugin = /* @__PURE__ */ new Map();
|
|
355
354
|
function loadPlugin(path) {
|
|
356
355
|
const cached = loadedPlugin.get(path);
|
|
@@ -400,6 +399,6 @@ function ensureArray(value) {
|
|
|
400
399
|
}
|
|
401
400
|
|
|
402
401
|
//#endregion
|
|
403
|
-
exports.
|
|
402
|
+
exports.rnw = rnw;
|
|
404
403
|
exports.silenceUseClientWarning = silenceUseClientWarning;
|
|
405
404
|
module.exports.default = module.exports
|
package/dist/index.d.cts
CHANGED
|
@@ -60,9 +60,9 @@ type ViteReactPluginApi = {
|
|
|
60
60
|
*/
|
|
61
61
|
reactBabel?: ReactBabelHook;
|
|
62
62
|
};
|
|
63
|
-
declare function
|
|
64
|
-
declare namespace
|
|
63
|
+
declare function rnw(opts?: Options): Plugin[];
|
|
64
|
+
declare namespace rnw {
|
|
65
65
|
var preambleCode: string;
|
|
66
66
|
}
|
|
67
67
|
//#endregion
|
|
68
|
-
export { BabelOptions, Options, ReactBabelOptions, ViteReactPluginApi,
|
|
68
|
+
export { BabelOptions, Options, ReactBabelOptions, ViteReactPluginApi, rnw, silenceUseClientWarning };
|
package/dist/index.d.ts
CHANGED
|
@@ -60,9 +60,9 @@ type ViteReactPluginApi = {
|
|
|
60
60
|
*/
|
|
61
61
|
reactBabel?: ReactBabelHook;
|
|
62
62
|
};
|
|
63
|
-
declare function
|
|
64
|
-
declare namespace
|
|
63
|
+
declare function rnw(opts?: Options): Plugin[];
|
|
64
|
+
declare namespace rnw {
|
|
65
65
|
var preambleCode: string;
|
|
66
66
|
}
|
|
67
67
|
//#endregion
|
|
68
|
-
export { BabelOptions, Options, ReactBabelOptions, ViteReactPluginApi,
|
|
68
|
+
export { BabelOptions, Options, ReactBabelOptions, ViteReactPluginApi, rnw, silenceUseClientWarning };
|
package/dist/index.js
CHANGED
|
@@ -128,7 +128,7 @@ const getInitialOptions = (opts) => {
|
|
|
128
128
|
optimizeDeps: "rolldownVersion" in vite ? { rollupOptions: { jsx: { mode: "automatic" } } } : { esbuildOptions: { jsx: "automatic" } }
|
|
129
129
|
};
|
|
130
130
|
};
|
|
131
|
-
function
|
|
131
|
+
function rnw(opts = {}) {
|
|
132
132
|
var _opts$babel;
|
|
133
133
|
const include = opts.include ?? defaultIncludeRE;
|
|
134
134
|
const exclude = opts.exclude ?? defaultExcludeRE;
|
|
@@ -327,7 +327,7 @@ function viteReactNativeWeb(opts = {}) {
|
|
|
327
327
|
viteReactRefresh
|
|
328
328
|
];
|
|
329
329
|
}
|
|
330
|
-
|
|
330
|
+
rnw.preambleCode = preambleCode;
|
|
331
331
|
const loadedPlugin = /* @__PURE__ */ new Map();
|
|
332
332
|
function loadPlugin(path) {
|
|
333
333
|
const cached = loadedPlugin.get(path);
|
|
@@ -377,4 +377,4 @@ function ensureArray(value) {
|
|
|
377
377
|
}
|
|
378
378
|
|
|
379
379
|
//#endregion
|
|
380
|
-
export {
|
|
380
|
+
export { rnw, silenceUseClientWarning };
|
package/package.json
CHANGED