@nativescript/vite 0.0.1-alpha.7 → 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/LICENSE +19 -0
- package/README.md +44 -0
- package/{dist/configuration → configuration}/angular.d.ts +1 -1
- package/configuration/angular.js +480 -0
- package/configuration/angular.js.map +1 -0
- package/configuration/base.d.ts +5 -0
- package/configuration/base.js +494 -0
- package/configuration/base.js.map +1 -0
- package/configuration/javascript.d.ts +4 -0
- package/configuration/javascript.js +151 -0
- package/configuration/javascript.js.map +1 -0
- package/{dist/configuration → configuration}/react.d.ts +1 -1
- package/{dist/configuration → configuration}/react.js +18 -17
- package/configuration/react.js.map +1 -0
- package/{dist/configuration → configuration}/solid.d.ts +1 -1
- package/{dist/configuration → configuration}/solid.js +17 -16
- package/configuration/solid.js.map +1 -0
- package/configuration/typescript.d.ts +4 -0
- package/configuration/typescript.js +175 -0
- package/configuration/typescript.js.map +1 -0
- package/{dist/configuration → configuration}/vue.d.ts +1 -1
- package/configuration/vue.js +163 -0
- package/configuration/vue.js.map +1 -0
- package/helpers/angular-linker.d.ts +13 -0
- package/helpers/angular-linker.js +181 -0
- package/helpers/angular-linker.js.map +1 -0
- package/helpers/cli-flags.d.ts +1 -0
- package/helpers/cli-flags.js +15 -0
- package/helpers/cli-flags.js.map +1 -0
- package/{dist/helpers → helpers}/commonjs-plugins.js +14 -13
- package/helpers/commonjs-plugins.js.map +1 -0
- package/{dist/helpers → helpers}/config-as-json.d.ts +1 -1
- package/{dist/helpers → helpers}/config-as-json.js +7 -6
- package/helpers/config-as-json.js.map +1 -0
- package/helpers/css-platform-plugin.d.ts +10 -0
- package/helpers/css-platform-plugin.js +76 -0
- package/helpers/css-platform-plugin.js.map +1 -0
- package/helpers/css-tree.js +22 -0
- package/helpers/css-tree.js.map +1 -0
- package/{dist/helpers → helpers}/dynamic-import-plugin.js +8 -7
- package/helpers/dynamic-import-plugin.js.map +1 -0
- package/helpers/esbuild-platform-resolver.d.ts +14 -0
- package/helpers/esbuild-platform-resolver.js +93 -0
- package/helpers/esbuild-platform-resolver.js.map +1 -0
- package/{dist/helpers → helpers}/external-configs.js +2 -1
- package/helpers/external-configs.js.map +1 -0
- package/{dist/helpers → helpers}/flavor.d.ts +1 -0
- package/helpers/flavor.js +51 -0
- package/helpers/flavor.js.map +1 -0
- package/{dist/helpers → helpers}/global-defines.d.ts +11 -3
- package/helpers/global-defines.js +24 -0
- package/helpers/global-defines.js.map +1 -0
- package/helpers/logging.d.ts +13 -0
- package/helpers/logging.js +111 -0
- package/helpers/logging.js.map +1 -0
- package/helpers/main-entry.d.ts +10 -0
- package/helpers/main-entry.js +215 -0
- package/helpers/main-entry.js.map +1 -0
- package/{dist/helpers → helpers}/module-resolution.js +4 -3
- package/helpers/module-resolution.js.map +1 -0
- package/{dist/helpers → helpers}/module-runner-patch.d.ts +1 -1
- package/{dist/helpers → helpers}/module-runner-patch.js +10 -12
- package/helpers/module-runner-patch.js.map +1 -0
- package/helpers/nativeclass-transform.d.ts +7 -0
- package/helpers/nativeclass-transform.js +158 -0
- package/helpers/nativeclass-transform.js.map +1 -0
- package/helpers/nativeclass-transformer-plugin.d.ts +5 -0
- package/helpers/nativeclass-transformer-plugin.js +23 -0
- package/helpers/nativeclass-transformer-plugin.js.map +1 -0
- package/{dist/helpers → helpers}/nativescript-package-resolver.js +18 -17
- package/helpers/nativescript-package-resolver.js.map +1 -0
- package/{dist/helpers → helpers}/ns-cli-plugins.d.ts +6 -1
- package/{dist/helpers → helpers}/ns-cli-plugins.js +31 -51
- package/helpers/ns-cli-plugins.js.map +1 -0
- package/helpers/package-platform-aliases.d.ts +10 -0
- package/{dist/helpers → helpers}/package-platform-aliases.js +18 -22
- package/helpers/package-platform-aliases.js.map +1 -0
- package/helpers/postcss-platform-config.d.ts +13 -0
- package/helpers/postcss-platform-config.js +97 -0
- package/helpers/postcss-platform-config.js.map +1 -0
- package/helpers/prelink-angular.d.ts +2 -0
- package/helpers/prelink-angular.js +117 -0
- package/helpers/prelink-angular.js.map +1 -0
- package/helpers/preserve-imports.js +38 -0
- package/helpers/preserve-imports.js.map +1 -0
- package/{dist/helpers → helpers}/project.js +2 -4
- package/helpers/project.js.map +1 -0
- package/helpers/resolver.d.ts +4 -0
- package/{dist/helpers → helpers}/resolver.js +7 -6
- package/helpers/resolver.js.map +1 -0
- package/helpers/theme-core-plugins.d.ts +14 -0
- package/helpers/theme-core-plugins.js +121 -0
- package/helpers/theme-core-plugins.js.map +1 -0
- package/helpers/ts-config-paths.d.ts +10 -0
- package/{dist/helpers → helpers}/ts-config-paths.js +70 -71
- package/helpers/ts-config-paths.js.map +1 -0
- package/{dist/helpers → helpers}/utils.js +14 -27
- package/helpers/utils.js.map +1 -0
- package/{dist/helpers → helpers}/workers.js +15 -16
- package/helpers/workers.js.map +1 -0
- package/{dist/hmr → hmr/client}/css-handler.js +18 -17
- package/hmr/client/css-handler.js.map +1 -0
- package/hmr/client/index.d.ts +13 -0
- package/hmr/client/index.js +1550 -0
- package/hmr/client/index.js.map +1 -0
- package/hmr/client/utils.d.ts +38 -0
- package/hmr/client/utils.js +426 -0
- package/hmr/client/utils.js.map +1 -0
- package/hmr/entry-runtime.d.ts +8 -0
- package/hmr/entry-runtime.js +135 -0
- package/hmr/entry-runtime.js.map +1 -0
- package/hmr/frameworks/angular/server/strategy.d.ts +2 -0
- package/hmr/frameworks/angular/server/strategy.js +101 -0
- package/hmr/frameworks/angular/server/strategy.js.map +1 -0
- package/hmr/frameworks/vue/client/index.d.ts +22 -0
- package/hmr/frameworks/vue/client/index.js +1537 -0
- package/hmr/frameworks/vue/client/index.js.map +1 -0
- package/hmr/frameworks/vue/server/compiler.d.ts +11 -0
- package/hmr/frameworks/vue/server/compiler.js +26 -0
- package/hmr/frameworks/vue/server/compiler.js.map +1 -0
- package/hmr/frameworks/vue/server/sfc-transforms.d.ts +14 -0
- package/hmr/frameworks/vue/server/sfc-transforms.js +282 -0
- package/hmr/frameworks/vue/server/sfc-transforms.js.map +1 -0
- package/hmr/frameworks/vue/server/strategy.d.ts +2 -0
- package/hmr/frameworks/vue/server/strategy.js +273 -0
- package/hmr/frameworks/vue/server/strategy.js.map +1 -0
- package/hmr/helpers/ast-extract.d.ts +6 -0
- package/hmr/helpers/ast-extract.js +72 -0
- package/hmr/helpers/ast-extract.js.map +1 -0
- package/hmr/helpers/ast-normalizer.d.ts +7 -0
- package/hmr/helpers/ast-normalizer.js +772 -0
- package/hmr/helpers/ast-normalizer.js.map +1 -0
- package/hmr/helpers/babel.d.ts +3 -0
- package/hmr/helpers/babel.js +17 -0
- package/hmr/helpers/babel.js.map +1 -0
- package/hmr/helpers/sanitize.d.ts +6 -0
- package/hmr/helpers/sanitize.js +55 -0
- package/hmr/helpers/sanitize.js.map +1 -0
- package/hmr/helpers/vendor-rewrite.d.ts +1 -0
- package/hmr/helpers/vendor-rewrite.js +35 -0
- package/hmr/helpers/vendor-rewrite.js.map +1 -0
- package/hmr/server/compiler.d.ts +2 -0
- package/hmr/server/compiler.js +75 -0
- package/hmr/server/compiler.js.map +1 -0
- package/hmr/server/constants.d.ts +14 -0
- package/hmr/server/constants.js +23 -0
- package/hmr/server/constants.js.map +1 -0
- package/hmr/server/core-sanitize.d.ts +32 -0
- package/hmr/server/core-sanitize.js +134 -0
- package/hmr/server/core-sanitize.js.map +1 -0
- package/hmr/server/framework-strategy.d.ts +68 -0
- package/hmr/server/framework-strategy.js +2 -0
- package/hmr/server/framework-strategy.js.map +1 -0
- package/hmr/server/index.d.ts +5 -0
- package/hmr/server/index.js +19 -0
- package/hmr/server/index.js.map +1 -0
- package/hmr/server/vite-plugin.d.ts +5 -0
- package/{dist/hmr/plugins/plugin-vue.js → hmr/server/vite-plugin.js} +13 -15
- package/hmr/server/vite-plugin.js.map +1 -0
- package/hmr/server/websocket.d.ts +15 -0
- package/hmr/server/websocket.js +5528 -0
- package/hmr/server/websocket.js.map +1 -0
- package/hmr/shared/runtime/http-only-boot.d.ts +1 -0
- package/hmr/shared/runtime/http-only-boot.js +107 -0
- package/hmr/shared/runtime/http-only-boot.js.map +1 -0
- package/hmr/shared/runtime/root-placeholder.d.ts +1 -0
- package/hmr/shared/runtime/root-placeholder.js +142 -0
- package/hmr/shared/runtime/root-placeholder.js.map +1 -0
- package/hmr/shared/runtime/vendor-bootstrap.d.ts +1 -0
- package/hmr/shared/runtime/vendor-bootstrap.js +134 -0
- package/hmr/shared/runtime/vendor-bootstrap.js.map +1 -0
- package/hmr/shared/vendor/manifest-loader.d.ts +9 -0
- package/hmr/shared/vendor/manifest-loader.js +38 -0
- package/hmr/shared/vendor/manifest-loader.js.map +1 -0
- package/hmr/shared/vendor/manifest.d.ts +34 -0
- package/hmr/shared/vendor/manifest.js +787 -0
- package/hmr/shared/vendor/manifest.js.map +1 -0
- package/hmr/shared/vendor/registry.d.ts +9 -0
- package/hmr/shared/vendor/registry.js +62 -0
- package/hmr/shared/vendor/registry.js.map +1 -0
- package/hmr/vendor-bootstrap.d.ts +3 -0
- package/hmr/vendor-bootstrap.js +32 -0
- package/hmr/vendor-bootstrap.js.map +1 -0
- package/{dist/index.d.ts → index.d.ts} +2 -0
- package/{dist/index.js → index.js} +3 -0
- package/index.js.map +1 -0
- package/package.json +39 -31
- package/{dist/polyfills → polyfills}/mdn-data-at-rules.js +1 -0
- package/polyfills/mdn-data-at-rules.js.map +1 -0
- package/{dist/polyfills → polyfills}/mdn-data-properties.js +1 -0
- package/polyfills/mdn-data-properties.js.map +1 -0
- package/{dist/polyfills → polyfills}/mdn-data-syntaxes.js +1 -0
- package/polyfills/mdn-data-syntaxes.js.map +1 -0
- package/{dist/polyfills → polyfills}/module.js +1 -0
- package/polyfills/module.js.map +1 -0
- package/runtime/core-aliases-early.d.ts +1 -0
- package/runtime/core-aliases-early.js +334 -0
- package/runtime/core-aliases-early.js.map +1 -0
- package/shims/angular-animations-stub.d.ts +8 -0
- package/shims/angular-animations-stub.js +14 -0
- package/shims/angular-animations-stub.js.map +1 -0
- package/{dist/shims → shims}/node-module.js +3 -2
- package/shims/node-module.js.map +1 -0
- package/{dist/shims → shims}/react-reconciler-constants.js +2 -1
- package/shims/react-reconciler-constants.js.map +1 -0
- package/{dist/shims → shims}/react-reconciler.js +1 -0
- package/shims/react-reconciler.js.map +1 -0
- package/{dist/shims → shims}/set-value.js +5 -1
- package/shims/set-value.js.map +1 -0
- package/transformers/NativeClass/index.d.ts +2 -0
- package/transformers/NativeClass/index.js +222 -0
- package/transformers/NativeClass/index.js.map +1 -0
- package/dist/configuration/angular.js +0 -30
- package/dist/configuration/base.d.ts +0 -4
- package/dist/configuration/base.js +0 -386
- package/dist/configuration/vue.js +0 -45
- package/dist/helpers/css-tree.js +0 -21
- package/dist/helpers/flavor.js +0 -40
- package/dist/helpers/global-defines.js +0 -20
- package/dist/helpers/main-entry-hmr-includes.d.ts +0 -1
- package/dist/helpers/main-entry-hmr-includes.js +0 -18
- package/dist/helpers/main-entry.d.ts +0 -5
- package/dist/helpers/main-entry.js +0 -82
- package/dist/helpers/package-platform-aliases.d.ts +0 -4
- package/dist/helpers/preserve-imports.js +0 -19
- package/dist/helpers/resolver.d.ts +0 -4
- package/dist/helpers/ts-config-paths.d.ts +0 -4
- package/dist/hmr/client-vue.d.ts +0 -6
- package/dist/hmr/client-vue.js +0 -585
- package/dist/hmr/component-tracker.d.ts +0 -23
- package/dist/hmr/component-tracker.js +0 -193
- package/dist/hmr/message-handler.d.ts +0 -1
- package/dist/hmr/message-handler.js +0 -590
- package/dist/hmr/nsv-hooks.d.ts +0 -2
- package/dist/hmr/nsv-hooks.js +0 -481
- package/dist/hmr/plugins/index.d.ts +0 -1
- package/dist/hmr/plugins/index.js +0 -16
- package/dist/hmr/plugins/plugin-vue.d.ts +0 -2
- package/dist/hmr/plugins/websocket-vue.d.ts +0 -2
- package/dist/hmr/plugins/websocket-vue.js +0 -911
- package/dist/hmr/runtime-vue.d.ts +0 -13
- package/dist/hmr/runtime-vue.js +0 -2306
- package/dist/hmr/types.d.ts +0 -24
- package/dist/hmr/types.js +0 -2
- package/dist/transformers/NativeClass/index.d.ts +0 -5
- package/dist/transformers/NativeClass/index.js +0 -46
- /package/{dist/helpers → helpers}/commonjs-plugins.d.ts +0 -0
- /package/{dist/helpers → helpers}/css-tree.d.ts +0 -0
- /package/{dist/helpers → helpers}/dynamic-import-plugin.d.ts +0 -0
- /package/{dist/helpers → helpers}/external-configs.d.ts +0 -0
- /package/{dist/helpers → helpers}/module-resolution.d.ts +0 -0
- /package/{dist/helpers → helpers}/nativescript-package-resolver.d.ts +0 -0
- /package/{dist/helpers → helpers}/preserve-imports.d.ts +0 -0
- /package/{dist/helpers → helpers}/project.d.ts +0 -0
- /package/{dist/helpers → helpers}/utils.d.ts +0 -0
- /package/{dist/helpers → helpers}/workers.d.ts +0 -0
- /package/{dist/hmr → hmr/client}/css-handler.d.ts +0 -0
- /package/{dist/polyfills → polyfills}/mdn-data-at-rules.d.ts +0 -0
- /package/{dist/polyfills → polyfills}/mdn-data-properties.d.ts +0 -0
- /package/{dist/polyfills → polyfills}/mdn-data-syntaxes.d.ts +0 -0
- /package/{dist/polyfills → polyfills}/module.d.ts +0 -0
- /package/{dist/shims → shims}/node-module.d.ts +0 -0
- /package/{dist/shims → shims}/react-reconciler-constants.d.ts +0 -0
- /package/{dist/shims → shims}/react-reconciler.d.ts +0 -0
- /package/{dist/shims → shims}/set-value.d.ts +0 -0
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { mergeConfig } from 'vite';
|
|
2
|
+
import { readFileSync, readdirSync, statSync } from 'node:fs';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { baseConfig } from './base.js';
|
|
5
|
+
import { getCliFlags } from '../helpers/cli-flags.js';
|
|
6
|
+
/**
|
|
7
|
+
* Registers bundler modules for plain JavaScript apps (no .ts files),
|
|
8
|
+
* mimicking webpack's require.context used by NativeScript's XML builder.
|
|
9
|
+
* It generates a virtual context whose keys() return './<relative-path>' entries
|
|
10
|
+
* and invokes global.registerBundlerModules(context).
|
|
11
|
+
*/
|
|
12
|
+
function createBundlerContextPlugin() {
|
|
13
|
+
const VIRTUAL_ID = 'virtual:ns-bundler-context';
|
|
14
|
+
const RESOLVED_ID = '\0' + VIRTUAL_ID;
|
|
15
|
+
const ENTRY_ID = '\0virtual:entry-with-polyfills';
|
|
16
|
+
const flags = getCliFlags();
|
|
17
|
+
const platform = flags.android ? 'android' : flags.ios ? 'ios' : flags.visionos ? 'visionos' : undefined;
|
|
18
|
+
return {
|
|
19
|
+
name: 'ns-bundler-context-js',
|
|
20
|
+
enforce: 'pre',
|
|
21
|
+
resolveId(id) {
|
|
22
|
+
if (id === VIRTUAL_ID)
|
|
23
|
+
return RESOLVED_ID;
|
|
24
|
+
return null;
|
|
25
|
+
},
|
|
26
|
+
load(id) {
|
|
27
|
+
if (id !== RESOLVED_ID)
|
|
28
|
+
return null;
|
|
29
|
+
// Build a platform-filtered static module registry at build time using recursive fs walk (no fast-glob dependency).
|
|
30
|
+
const roots = ['src', 'app'];
|
|
31
|
+
const styleExtsSet = new Set(['css', 'scss', 'less', 'sass']);
|
|
32
|
+
function walk(dir, out) {
|
|
33
|
+
let entries = [];
|
|
34
|
+
try {
|
|
35
|
+
entries = readdirSync(dir);
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
return out;
|
|
39
|
+
}
|
|
40
|
+
for (const entry of entries) {
|
|
41
|
+
const full = path.posix.join(dir, entry);
|
|
42
|
+
let st;
|
|
43
|
+
try {
|
|
44
|
+
st = statSync(full);
|
|
45
|
+
}
|
|
46
|
+
catch {
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
if (st.isDirectory())
|
|
50
|
+
walk(full, out);
|
|
51
|
+
else
|
|
52
|
+
out.push(full);
|
|
53
|
+
}
|
|
54
|
+
return out;
|
|
55
|
+
}
|
|
56
|
+
function enumerate(filter) {
|
|
57
|
+
const files = [];
|
|
58
|
+
for (const r of roots)
|
|
59
|
+
walk(r, files);
|
|
60
|
+
return files.filter((f) => filter(f.split('.').pop() || ''));
|
|
61
|
+
}
|
|
62
|
+
function shouldExcludeAbsolute(p) {
|
|
63
|
+
const file = p.split('/').pop() || '';
|
|
64
|
+
if (file.startsWith('_'))
|
|
65
|
+
return true;
|
|
66
|
+
if (/\.d\.ts$/.test(p))
|
|
67
|
+
return true;
|
|
68
|
+
if (/([.-]worker)\.(ts|js)$/.test(file))
|
|
69
|
+
return true;
|
|
70
|
+
const isAndroidTagged = /\.android\./.test(p);
|
|
71
|
+
const isIosTagged = /\.ios\./.test(p) || /\.visionos\./.test(p);
|
|
72
|
+
if (platform === 'android' && isIosTagged)
|
|
73
|
+
return true;
|
|
74
|
+
if ((platform === 'ios' || platform === 'visionos') && isAndroidTagged)
|
|
75
|
+
return true;
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
function toImportSpecifier(abs) {
|
|
79
|
+
return '/' + abs.replace(/^\/+/, '');
|
|
80
|
+
}
|
|
81
|
+
function toCtxKey(abs) {
|
|
82
|
+
let rel = abs;
|
|
83
|
+
if (rel.startsWith('src/'))
|
|
84
|
+
rel = rel.slice('src/'.length);
|
|
85
|
+
else if (rel.startsWith('app/'))
|
|
86
|
+
rel = rel.slice('app/'.length);
|
|
87
|
+
return './' + rel;
|
|
88
|
+
}
|
|
89
|
+
const xmlFiles = enumerate((ext) => ext === 'xml').filter((f) => !shouldExcludeAbsolute(f));
|
|
90
|
+
const styleFiles = enumerate((ext) => styleExtsSet.has(ext)).filter((f) => !shouldExcludeAbsolute(f));
|
|
91
|
+
const jsFiles = enumerate((ext) => ext === 'js').filter((f) => !shouldExcludeAbsolute(f));
|
|
92
|
+
let importLines = [];
|
|
93
|
+
let registryEntries = [];
|
|
94
|
+
let moduleMapLines = [];
|
|
95
|
+
let index = 0;
|
|
96
|
+
function pushImport(abs, raw) {
|
|
97
|
+
const id = `__m${index++}`;
|
|
98
|
+
const spec = toImportSpecifier(abs) + (raw ? '?raw' : '');
|
|
99
|
+
importLines.push(`import ${raw ? id : `* as ${id}`} from '${spec}';`);
|
|
100
|
+
const ctxKey = toCtxKey(abs);
|
|
101
|
+
registryEntries.push(`registry.set('${ctxKey}', '${spec.replace(/\?raw$/, '')}');`);
|
|
102
|
+
moduleMapLines.push(`all['${spec.replace(/\?raw$/, '')}'] = ${id};`);
|
|
103
|
+
}
|
|
104
|
+
xmlFiles.forEach((f) => pushImport(f, true));
|
|
105
|
+
styleFiles.forEach((f) => pushImport(f, true));
|
|
106
|
+
jsFiles.forEach((f) => pushImport(f, false));
|
|
107
|
+
const code = `// Generated virtual bundler context (platform=${platform || 'unknown'})\n${importLines.join('\n')}\n(function(){\n const registry = new Map();\n const all = {};\n ${moduleMapLines.join('\n ')}\n ${registryEntries.join('\n ')}\n function context(key){\n const real = registry.get(key);\n if(!real) throw new Error('[ns-vite] Module not found in context: '+key);\n return all[real];\n }\n context.keys = function(){ return Array.from(registry.keys()); };\n const g = (typeof globalThis !== 'undefined' ? globalThis : (typeof global !== 'undefined' ? global : {}));\n if(g && typeof g.registerBundlerModules === 'function'){ g.registerBundlerModules(context); } else { setTimeout(()=>{ try { g.registerBundlerModules && g.registerBundlerModules(context); } catch{} },0); }\n})();`;
|
|
108
|
+
return { code, map: null };
|
|
109
|
+
},
|
|
110
|
+
transform(code, id) {
|
|
111
|
+
// Inject our registration immediately after bundle-entry-points import
|
|
112
|
+
if (id === ENTRY_ID || id.endsWith('virtual:entry-with-polyfills')) {
|
|
113
|
+
const marker = "import '@nativescript/core/bundle-entry-points';";
|
|
114
|
+
if (code.includes(marker)) {
|
|
115
|
+
return {
|
|
116
|
+
code: code.replace(marker, `${marker}\n// Ensure style system is initialized before any UI component modules register CSS properties\nimport '@nativescript/core/ui/styling/style';\nimport '@nativescript/core/ui/styling/style-properties';\nimport 'virtual:ns-bundler-context';\n// Patch CSS accessors to be resilient to early default initializations before style exists\n(function(){\n try {\n const __ui = (global.loadModule ? global.loadModule('@nativescript/core/ui') : (global.require ? global.require('@nativescript/core/ui') : null));\n if (__ui && __ui.View) {\n const View = __ui.View;\n const props = ['order','flexGrow','flexShrink','flexWrapBefore','alignSelf'];\n for (const p of props) {\n const d = Object.getOwnPropertyDescriptor(View.prototype, p);\n if (d && typeof d.set === 'function') {\n const origSet = d.set;\n Object.defineProperty(View.prototype, p, {\n configurable: true,\n enumerable: d.enumerable,\n get: d.get,\n set(value){\n if (value === undefined || value === null) return;\n if (!this || !this._style) {\n try { if (this && !this._style) this._style = this.style; } catch(_) {}\n if (!this || !this._style) return;\n }\n return origSet.call(this, value);\n }\n });\n }\n }\n }\n } catch(_) {}\n})();\n// Vite adjustment: register short core UI element module names (e.g. Frame, StackLayout)\n// Some XML builder paths attempt to load 'Frame' directly instead of the barrel.\n// We expose individual element names so global.loadModule('Frame') works.\ntry {\n const __ui = (global.loadModule ? global.loadModule('@nativescript/core/ui') : (global.require ? global.require('@nativescript/core/ui') : null));\n if (__ui && global.registerModule) {\n const existsFn = global.moduleExists ? (n) => global.moduleExists(n) : () => false;\n Object.keys(__ui).forEach(k => {\n if (k && k[0] === k[0].toUpperCase() && !existsFn(k)) {\n try {\n global.registerModule(k, () => ({ [k]: __ui[k] }));\n } catch (e) { /* swallow */ }\n }\n });\n }\n} catch(e) { /* ignore */ }\n`),
|
|
117
|
+
map: null,
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return null;
|
|
122
|
+
},
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
function createXmlLoaderPlugin() {
|
|
126
|
+
return {
|
|
127
|
+
name: 'ns-xml-loader-js',
|
|
128
|
+
enforce: 'pre',
|
|
129
|
+
load(id) {
|
|
130
|
+
if (!id.endsWith('.xml'))
|
|
131
|
+
return null;
|
|
132
|
+
try {
|
|
133
|
+
const src = readFileSync(id, 'utf-8');
|
|
134
|
+
const xml = JSON.stringify(src)
|
|
135
|
+
.replace(/\u2028/g, '\\u2028')
|
|
136
|
+
.replace(/\u2029/g, '\\u2029');
|
|
137
|
+
const code = `const ___XML___ = ${xml};\nexport default ___XML___;`;
|
|
138
|
+
return { code, map: null };
|
|
139
|
+
}
|
|
140
|
+
catch {
|
|
141
|
+
return null;
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
export const javascriptConfig = ({ mode }) => {
|
|
147
|
+
return mergeConfig(baseConfig({ mode }), {
|
|
148
|
+
plugins: [createXmlLoaderPlugin(), createBundlerContextPlugin()],
|
|
149
|
+
});
|
|
150
|
+
};
|
|
151
|
+
//# sourceMappingURL=javascript.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"javascript.js","sourceRoot":"","sources":["../../../../packages/vite/configuration/javascript.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAgC,MAAM,MAAM,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD;;;;;GAKG;AACH,SAAS,0BAA0B;IAClC,MAAM,UAAU,GAAG,4BAA4B,CAAC;IAChD,MAAM,WAAW,GAAG,IAAI,GAAG,UAAU,CAAC;IACtC,MAAM,QAAQ,GAAG,gCAAgC,CAAC;IAClD,MAAM,KAAK,GAAG,WAAW,EAAE,CAAC;IAC5B,MAAM,QAAQ,GAA+C,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC;IAErJ,OAAO;QACN,IAAI,EAAE,uBAAuB;QAC7B,OAAO,EAAE,KAAK;QACd,SAAS,CAAC,E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AA8qE,CACvrE;wBACD,GAAG,EAAE,IAAI;qBACT,CAAC;gBACH,CAAC;YACF,CAAC;YACD,OAAO,IAAI,CAAC;QACb,CAAC;KACD,CAAC;AACH,CAAC;AAED,SAAS,qBAAqB;IAC7B,OAAO;QACN,IAAI,EAAE,kBAAkB;QACxB,OAAO,EAAE,KAAK;QACd,IAAI,CAAC,EAAE;YACN,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC;gBAAE,OAAO,IAAI,CAAC;YACtC,IAAI,CAAC;gBACJ,MAAM,GAAG,GAAG,YAAY,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;gBACtC,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC;qBAC7B,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC;qBAC7B,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;gBAChC,MAAM,IAAI,GAAG,qBAAqB,GAAG,8BAA8B,CAAC;gBACpE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAS,CAAC;YACnC,CAAC;YAAC,MAAM,CAAC;gBACR,OAAO,IAAI,CAAC;YACb,CAAC;QACF,CAAC;KACD,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAAE,IAAI,EAAE,EAAc,EAAE;IACxD,OAAO,WAAW,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE;QACxC,OAAO,EAAE,CAAC,qBAAqB,EAAE,EAAE,0BAA0B,EAAE,CAAC;KAChE,CAAC,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import alias from
|
|
2
|
-
import { fileURLToPath } from
|
|
3
|
-
import { dirname, resolve } from
|
|
4
|
-
import { mergeConfig } from
|
|
5
|
-
import { baseConfig } from
|
|
1
|
+
import alias from '@rollup/plugin-alias';
|
|
2
|
+
import { fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname, resolve } from 'node:path';
|
|
4
|
+
import { mergeConfig } from 'vite';
|
|
5
|
+
import { baseConfig } from './base.js';
|
|
6
6
|
const __filename = fileURLToPath(import.meta.url);
|
|
7
7
|
const __dirname = dirname(__filename);
|
|
8
8
|
const plugins = [
|
|
@@ -11,33 +11,33 @@ const plugins = [
|
|
|
11
11
|
entries: {
|
|
12
12
|
// Essential aliases for React NativeScript compatibility
|
|
13
13
|
// Only alias react-dom related imports, NOT React itself
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
'react-dom': 'react-nativescript',
|
|
15
|
+
'react-dom/client': 'react-nativescript',
|
|
16
|
+
'react-dom/server': 'react-nativescript',
|
|
17
17
|
// Handle react-reconciler exports issue
|
|
18
18
|
// This addresses the "DefaultEventPriority" and "LegacyRoot" not exported errors
|
|
19
|
-
|
|
19
|
+
'react-reconciler/constants': resolve(__dirname, '../shims/react-reconciler-constants.js'),
|
|
20
20
|
// Additional React ecosystem compatibility
|
|
21
|
-
|
|
21
|
+
'react-reconciler/src/ReactFiberHostConfig': 'react-nativescript/dist/client/HostConfig',
|
|
22
22
|
// Fix React reconciler namespace issue
|
|
23
|
-
|
|
23
|
+
'react-reconciler': resolve(__dirname, '../shims/react-reconciler.js'),
|
|
24
24
|
// Additional shims
|
|
25
|
-
|
|
25
|
+
'set-value': resolve(__dirname, '../shims/set-value.js'),
|
|
26
26
|
},
|
|
27
27
|
}),
|
|
28
|
-
enforce:
|
|
28
|
+
enforce: 'pre',
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
|
-
name:
|
|
31
|
+
name: 'react-nativescript-resolver',
|
|
32
32
|
resolveId(id) {
|
|
33
33
|
// Ensure React core exports are properly resolved
|
|
34
|
-
if (id ===
|
|
35
|
-
return { id:
|
|
34
|
+
if (id === 'react') {
|
|
35
|
+
return { id: 'react', external: false };
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
load(id) {
|
|
39
39
|
// Handle React module loading to ensure all exports are available
|
|
40
|
-
if (id ===
|
|
40
|
+
if (id === 'react') {
|
|
41
41
|
return `
|
|
42
42
|
// Re-export all React exports to ensure they're available
|
|
43
43
|
import * as React from 'react/index.js';
|
|
@@ -83,3 +83,4 @@ export const reactConfig = ({ mode }) => {
|
|
|
83
83
|
plugins,
|
|
84
84
|
});
|
|
85
85
|
};
|
|
86
|
+
//# sourceMappingURL=react.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react.js","sourceRoot":"","sources":["../../../../packages/vite/configuration/react.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,sBAAsB,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAmB,MAAM,MAAM,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAEtC,MAAM,OAAO,GAAG;IACf;QACC,GAAG,KAAK,CAAC;YACR,OAAO,EAAE;gBACR,yDAAyD;gBACzD,yDAAyD;gBACzD,WAAW,EAAE,oBAAoB;gBACjC,kBAAkB,EAAE,oBAAoB;gBACxC,kBAAkB,EAAE,oBAAoB;gBAExC,wCAAwC;gBACxC,iFAAiF;gBACjF,4BAA4B,EAAE,OAAO,CAAC,SAAS,EAAE,wCAAwC,CAAC;gBAE1F,2CAA2C;gBAC3C,2CAA2C,EAAE,2CAA2C;gBAExF,uCAAuC;gBACvC,kBAAkB,EAAE,OAAO,CAAC,SAAS,EAAE,8BAA8B,CAAC;gBAEtE,mBAAmB;gBACnB,WAAW,EAAE,OAAO,CAAC,SAAS,EAAE,uBAAuB,CAAC;aACxD;SACD,CAAC;QACF,OAAO,EAAE,KAAK;KACd;IACD;QACC,IAAI,EAAE,6BAA6B;QACnC,SAAS,CAAC,EAAE;YACX,kDAAkD;YAClD,IAAI,EAAE,KAAK,OAAO,EAAE,CAAC;gBACpB,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;YACzC,CAAC;QACF,CAAC;QACD,IAAI,CAAC,EAAE;YACN,kEAAkE;YAClE,IAAI,EAAE,KAAK,OAAO,EAAE,CAAC;gBACpB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCV,CAAC;YACC,CAAC;QACF,CAAC;KACD;CACD,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAAE,IAAI,EAAE,EAAc,EAAE;IACnD,OAAO,WAAW,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE;QACxC,OAAO;KACP,CAAC,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import solid from
|
|
2
|
-
import path from
|
|
3
|
-
import alias from
|
|
4
|
-
import { fileURLToPath } from
|
|
5
|
-
import { dirname, resolve } from
|
|
6
|
-
import { getProjectRootPath } from
|
|
7
|
-
import { mergeConfig } from
|
|
8
|
-
import { baseConfig } from
|
|
1
|
+
import solid from 'vite-plugin-solid';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import alias from '@rollup/plugin-alias';
|
|
4
|
+
import { fileURLToPath } from 'node:url';
|
|
5
|
+
import { dirname, resolve } from 'node:path';
|
|
6
|
+
import { getProjectRootPath } from '../helpers/project.js';
|
|
7
|
+
import { mergeConfig } from 'vite';
|
|
8
|
+
import { baseConfig } from './base.js';
|
|
9
9
|
const __filename = fileURLToPath(import.meta.url);
|
|
10
10
|
const __dirname = dirname(__filename);
|
|
11
11
|
const projectRoot = getProjectRootPath();
|
|
12
|
-
const solidPath = path.resolve(projectRoot,
|
|
12
|
+
const solidPath = path.resolve(projectRoot, 'node_modules/solid-js');
|
|
13
13
|
const prod = !!process.env.production;
|
|
14
14
|
const plugins = [
|
|
15
15
|
{
|
|
16
16
|
...alias({
|
|
17
17
|
entries: {
|
|
18
18
|
// Fix the web alias - it should NOT point to web/dist but to the main dist
|
|
19
|
-
|
|
19
|
+
'solid-js/web': resolve(solidPath, `web/dist/${prod ? 'web' : 'dev'}.js`),
|
|
20
20
|
// Alias solid-js modules to proper locations
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
'solid-js/universal': resolve(solidPath, `universal/dist/${prod ? 'universal' : 'dev'}.js`),
|
|
22
|
+
'solid-js/store': resolve(solidPath, `store/dist/${prod ? 'store' : 'dev'}.js`),
|
|
23
|
+
'solid-js': resolve(solidPath, `dist/${prod ? 'solid' : 'dev'}.js`),
|
|
24
24
|
},
|
|
25
25
|
}),
|
|
26
|
-
enforce:
|
|
26
|
+
enforce: 'pre',
|
|
27
27
|
},
|
|
28
28
|
// Enable SolidJS support with NativeScript configuration
|
|
29
29
|
solid({
|
|
@@ -34,10 +34,10 @@ const plugins = [
|
|
|
34
34
|
// Configure solid compiler options for NativeScript
|
|
35
35
|
solid: {
|
|
36
36
|
// Use universal instead of dom for NativeScript compatibility
|
|
37
|
-
generate:
|
|
37
|
+
generate: 'universal',
|
|
38
38
|
hydratable: false,
|
|
39
39
|
// Use the NativeScript community SolidJS renderer
|
|
40
|
-
moduleName:
|
|
40
|
+
moduleName: '@nativescript-community/solid-js',
|
|
41
41
|
},
|
|
42
42
|
}),
|
|
43
43
|
];
|
|
@@ -46,3 +46,4 @@ export const solidConfig = ({ mode }) => {
|
|
|
46
46
|
plugins,
|
|
47
47
|
});
|
|
48
48
|
};
|
|
49
|
+
//# sourceMappingURL=solid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"solid.js","sourceRoot":"","sources":["../../../../packages/vite/configuration/solid.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,mBAAmB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KAAK,KAAK,CAAC;aACnE;SACD,CAAC;QACF,OAAO,EAAE,KAAK;KACd;IACD,yDAAyD;IACzD,KAAK,CAAC;QACL,4BAA4B;QAC5B,GAAG,EAAE,CAAC,IAAI;QACV,6BAA6B;QAC7B,GAAG,EAAE,CAAC,IAAI;QACV,oDAAoD;QACpD,KAAK,EAAE;YACN,8DAA8D;YAC9D,QAAQ,EAAE,WAAW;YACrB,UAAU,EAAE,KAAK;YACjB,kDAAkD;YAClD,UAAU,EAAE,kCAAkC;SAC9C;KACD,CAAC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAAE,IAAI,EAAE,EAAc,EAAE;IACnD,OAAO,WAAW,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE;QACxC,OAAO;KACP,CAAC,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { mergeConfig } from 'vite';
|
|
2
|
+
import { readFileSync, readdirSync, statSync } from 'node:fs';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { baseConfig } from './base.js';
|
|
5
|
+
import { getCliFlags } from '../helpers/cli-flags.js';
|
|
6
|
+
import { getPackageJson, getProjectFilePath, getProjectRootPath } from '../helpers/project.js';
|
|
7
|
+
/**
|
|
8
|
+
* TypeScript + XML NativeScript Vite configuration.
|
|
9
|
+
* Adds a virtual require.context style registry (xml, js, ts, css, scss) similar to webpack5.
|
|
10
|
+
* This enables the XML builder's module resolution (resolveModuleName) to find page/component files.
|
|
11
|
+
*/
|
|
12
|
+
function createBundlerContextPlugin() {
|
|
13
|
+
const VIRTUAL_ID = 'virtual:ns-bundler-context';
|
|
14
|
+
const RESOLVED_ID = '\0' + VIRTUAL_ID;
|
|
15
|
+
const flags = getCliFlags();
|
|
16
|
+
const platform = flags.android ? 'android' : flags.ios ? 'ios' : flags.visionos ? 'visionos' : undefined;
|
|
17
|
+
// Determine the app's declared main entry to avoid eagerly importing it (which would execute Application.run too early)
|
|
18
|
+
const projectRoot = getProjectRootPath();
|
|
19
|
+
const pkg = getPackageJson();
|
|
20
|
+
let mainEntryRel;
|
|
21
|
+
try {
|
|
22
|
+
const mainAbs = getProjectFilePath(pkg.main);
|
|
23
|
+
const rel = path.posix.relative(projectRoot.replace(/\\/g, '/'), mainAbs.replace(/\\/g, '/'));
|
|
24
|
+
mainEntryRel = rel.replace(/^\/+/, ''); // e.g., 'src/main.ts'
|
|
25
|
+
}
|
|
26
|
+
catch { }
|
|
27
|
+
return {
|
|
28
|
+
name: 'ns-bundler-context-ts',
|
|
29
|
+
enforce: 'pre',
|
|
30
|
+
resolveId(id) {
|
|
31
|
+
if (id === VIRTUAL_ID)
|
|
32
|
+
return RESOLVED_ID;
|
|
33
|
+
return null;
|
|
34
|
+
},
|
|
35
|
+
load(id) {
|
|
36
|
+
if (id !== RESOLVED_ID)
|
|
37
|
+
return null;
|
|
38
|
+
// Build platform-filtered static module registry similar to webpack's require.context.
|
|
39
|
+
// Generic: only XML, styles and their paired code-behind files. Test/app specific additions belong in app vite.config.ts.
|
|
40
|
+
const roots = ['src', 'app'];
|
|
41
|
+
function walk(dir, out) {
|
|
42
|
+
let entries = [];
|
|
43
|
+
try {
|
|
44
|
+
entries = readdirSync(dir);
|
|
45
|
+
}
|
|
46
|
+
catch {
|
|
47
|
+
return out;
|
|
48
|
+
}
|
|
49
|
+
for (const entry of entries) {
|
|
50
|
+
const full = path.posix.join(dir, entry);
|
|
51
|
+
let st;
|
|
52
|
+
try {
|
|
53
|
+
st = statSync(full);
|
|
54
|
+
}
|
|
55
|
+
catch {
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
if (st.isDirectory())
|
|
59
|
+
walk(full, out);
|
|
60
|
+
else
|
|
61
|
+
out.push(full);
|
|
62
|
+
}
|
|
63
|
+
return out;
|
|
64
|
+
}
|
|
65
|
+
function listAll() {
|
|
66
|
+
const files = [];
|
|
67
|
+
for (const r of roots)
|
|
68
|
+
walk(r, files);
|
|
69
|
+
return files;
|
|
70
|
+
}
|
|
71
|
+
function shouldExcludeAbsolute(p) {
|
|
72
|
+
const file = p.split('/').pop() || '';
|
|
73
|
+
if (file.startsWith('_'))
|
|
74
|
+
return true;
|
|
75
|
+
if (/\.d\.ts$/.test(p))
|
|
76
|
+
return true;
|
|
77
|
+
if (/([.-]worker)\.(ts|js)$/.test(file))
|
|
78
|
+
return true;
|
|
79
|
+
const isAndroidTagged = /\.android\./.test(p);
|
|
80
|
+
const isIosTagged = /\.ios\./.test(p) || /\.visionos\./.test(p);
|
|
81
|
+
if (platform === 'android' && isIosTagged)
|
|
82
|
+
return true;
|
|
83
|
+
if (['ios', 'visionos'].includes(platform) && isAndroidTagged)
|
|
84
|
+
return true;
|
|
85
|
+
return false;
|
|
86
|
+
}
|
|
87
|
+
function toImportSpecifier(abs) {
|
|
88
|
+
return '/' + abs.replace(/^\/+/, '');
|
|
89
|
+
}
|
|
90
|
+
function toCtxKey(abs) {
|
|
91
|
+
let rel = abs;
|
|
92
|
+
if (rel.startsWith('src/'))
|
|
93
|
+
rel = rel.slice('src/'.length);
|
|
94
|
+
else if (rel.startsWith('app/'))
|
|
95
|
+
rel = rel.slice('app/'.length);
|
|
96
|
+
else if (rel.startsWith('packages/core/src/'))
|
|
97
|
+
rel = rel.slice('packages/core/src/'.length);
|
|
98
|
+
return './' + rel;
|
|
99
|
+
}
|
|
100
|
+
const allFiles = listAll().filter((f) => !shouldExcludeAbsolute(f));
|
|
101
|
+
const xmlFiles = allFiles.filter((f) => f.endsWith('.xml'));
|
|
102
|
+
const styleFiles = allFiles.filter((f) => /\.(css|scss|less|sass)$/.test(f));
|
|
103
|
+
// Import only code-behind files paired with XML (mirrors webpack's contextual resolution)
|
|
104
|
+
const xmlBases = new Set(xmlFiles.map((x) => x.slice(0, -'.xml'.length)));
|
|
105
|
+
const codeFiles = [];
|
|
106
|
+
for (const base of xmlBases) {
|
|
107
|
+
const tsCandidate = `${base}.ts`;
|
|
108
|
+
const jsCandidate = `${base}.js`;
|
|
109
|
+
if ((!mainEntryRel || tsCandidate !== mainEntryRel) && allFiles.includes(tsCandidate))
|
|
110
|
+
codeFiles.push(tsCandidate);
|
|
111
|
+
else if ((!mainEntryRel || jsCandidate !== mainEntryRel) && allFiles.includes(jsCandidate))
|
|
112
|
+
codeFiles.push(jsCandidate);
|
|
113
|
+
}
|
|
114
|
+
// Do not include additional modules beyond XML-paired code-behind to avoid early side effects.
|
|
115
|
+
let importLines = [];
|
|
116
|
+
let registryEntries = [];
|
|
117
|
+
let moduleMapLines = [];
|
|
118
|
+
let index = 0;
|
|
119
|
+
function pushImport(abs, raw) {
|
|
120
|
+
const idLocal = `__m${index++}`;
|
|
121
|
+
const spec = toImportSpecifier(abs) + (raw ? '?raw' : '');
|
|
122
|
+
importLines.push(`import ${raw ? idLocal : `* as ${idLocal}`} from '${spec}';`);
|
|
123
|
+
const cleaned = spec.replace(/\?raw$/, '');
|
|
124
|
+
registryEntries.push(`registry.set('${toCtxKey(abs)}','${cleaned}');`);
|
|
125
|
+
moduleMapLines.push(`all['${cleaned}'] = ${idLocal};`);
|
|
126
|
+
}
|
|
127
|
+
xmlFiles.forEach((f) => pushImport(f, true));
|
|
128
|
+
styleFiles.forEach((f) => pushImport(f, true));
|
|
129
|
+
// Sort code files as well for determinism (some tests rely on early registration of core pages/components)
|
|
130
|
+
codeFiles.sort((a, b) => a.localeCompare(b)).forEach((f) => pushImport(f, false));
|
|
131
|
+
// We no longer manually register nickname modules here; core's registerBundlerModules already adds nicknames.
|
|
132
|
+
const code = `// Generated virtual bundler context (platform=${platform || 'unknown'})\n${importLines.join('\n')}\n(function(){\n const registry = new Map();\n const all = {};\n ${moduleMapLines.join('\n ')}\n ${registryEntries.join('\n ')}\n function context(key){\n const real = registry.get(key);\n if(!real) throw new Error('[ns-vite] Module not found in context: '+key);\n return all[real];\n }\n context.keys = function(){ return Array.from(registry.keys()); };\n // Register modules now with extension map so .ts/.scss nicknames resolve like webpack\n try { if (global.registerBundlerModules) { global.registerBundlerModules(context, { '.ts': '.js', '.scss': '.css', '.sass': '.css', '.less': '.css' }); } } catch(e) { try { console.warn('[ns-vite] registerBundlerModules error', e); } catch(_) {} }\n // Safety: ensure main-page nickname exists if XML present\n try {\n const hasMainPageXml = context.keys().some(k => /(^\\.\\/?main-page\\.xml$|\\/main-page\\.xml$)/.test(k));\n if (hasMainPageXml && global.moduleExists && !global.moduleExists('main-page') && global.registerBundlerModules) {\n global.registerBundlerModules(context, { '.ts': '.js', '.scss': '.css', '.sass': '.css', '.less': '.css' });\n }\n } catch(_) {}\n})();`;
|
|
133
|
+
return { code, map: null };
|
|
134
|
+
},
|
|
135
|
+
transform(code, id) {
|
|
136
|
+
// Ensure style system is initialized before any UI component modules register CSS properties
|
|
137
|
+
// and ensure the bundler context is imported early in the virtual entry (parity with JS config)
|
|
138
|
+
if (id.endsWith('virtual:entry-with-polyfills')) {
|
|
139
|
+
const marker = "import '@nativescript/core/bundle-entry-points';";
|
|
140
|
+
if (code.includes(marker)) {
|
|
141
|
+
const injected = `${marker}\nimport '@nativescript/core/ui/styling/style';\nimport '@nativescript/core/ui/styling/style-properties';\nimport 'virtual:ns-bundler-context';\n(function(){\n try {\n const __ui = (global.loadModule ? global.loadModule('@nativescript/core/ui') : (global.require ? global.require('@nativescript/core/ui') : null));\n if (__ui && __ui.View) {\n const View = __ui.View;\n const props = ['order','flexGrow','flexShrink','flexWrapBefore','alignSelf'];\n for (const p of props) {\n const d = Object.getOwnPropertyDescriptor(View.prototype, p);\n if (d && typeof d.set === 'function') {\n const origSet = d.set;\n Object.defineProperty(View.prototype, p, {\n configurable: true,\n enumerable: d.enumerable,\n get: d.get,\n set(value){\n if (value === undefined || value === null) return;\n if (!this || !this._style) {\n try { if (this && !this._style) this._style = this.style; } catch(_) {}\n if (!this || !this._style) return;\n }\n return origSet.call(this, value);\n }\n });\n }\n }\n // Force layout invalidation for alignment/visibility/size property changes \n const forceProps = ['horizontalAlignment','verticalAlignment','visibility','height','width'];\n for (const p of forceProps) {\n const d = Object.getOwnPropertyDescriptor(View.prototype, p);\n if (d && typeof d.set === 'function') {\n const orig = d.set;\n Object.defineProperty(View.prototype, p, {\n configurable: true,\n enumerable: d.enumerable,\n get: d.get,\n set(value){\n const prev = this[p];\n try { orig.call(this, value); } finally {\n if (prev !== value) { try { this && this.requestLayout && this.requestLayout(); } catch(_) {} }\n }\n }\n });\n }\n }\n }\n } catch(_) {}\n})();\n`;
|
|
142
|
+
return { code: code.replace(marker, injected), map: null };
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
return null;
|
|
146
|
+
},
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
function createXmlLoaderPlugin() {
|
|
150
|
+
return {
|
|
151
|
+
name: 'ns-xml-loader-ts',
|
|
152
|
+
enforce: 'pre',
|
|
153
|
+
load(id) {
|
|
154
|
+
if (!id.endsWith('.xml'))
|
|
155
|
+
return null;
|
|
156
|
+
try {
|
|
157
|
+
const src = readFileSync(id, 'utf-8');
|
|
158
|
+
const xml = JSON.stringify(src)
|
|
159
|
+
.replace(/\u2028/g, '\\u2028')
|
|
160
|
+
.replace(/\u2029/g, '\\u2029');
|
|
161
|
+
const code = `const ___XML___ = ${xml};\nexport default ___XML___;`;
|
|
162
|
+
return { code, map: null };
|
|
163
|
+
}
|
|
164
|
+
catch {
|
|
165
|
+
return null;
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
export const typescriptConfig = ({ mode }) => {
|
|
171
|
+
return mergeConfig(baseConfig({ mode }), {
|
|
172
|
+
plugins: [createXmlLoaderPlugin(), createBundlerContextPlugin()],
|
|
173
|
+
});
|
|
174
|
+
};
|
|
175
|
+
//# sourceMappingURL=typescript.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typescript.js","sourceRoot":"","sources":["../../../../packages/vite/configuration/typescript.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,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