@webspatial/react-sdk 0.0.2 → 0.0.3
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/dist/jsx/jsx-dev-runtime.js +35 -35
- package/dist/jsx/jsx-dev-runtime.js.map +4 -4
- package/dist/jsx/jsx-runtime.js +35 -35
- package/dist/jsx/jsx-runtime.js.map +4 -4
- package/npm/index.js +3 -3
- package/npm/plugin/shared.js +2 -2
- package/npm/plugin/vite.js +7 -7
- package/package.json +3 -3
package/npm/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
if (process.env.XR_ENV === '
|
|
4
|
-
module.exports = require('../dist/cjs/web/index.js')
|
|
5
|
-
} else {
|
|
3
|
+
if (process.env.XR_ENV === 'avp') {
|
|
6
4
|
module.exports = require('../dist/cjs/default/index.js')
|
|
5
|
+
} else {
|
|
6
|
+
module.exports = require('../dist/cjs/web/index.js')
|
|
7
7
|
}
|
package/npm/plugin/shared.js
CHANGED
package/npm/plugin/vite.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const path = require('path')
|
|
2
2
|
const fs = require('fs')
|
|
3
|
-
const { getEnv,
|
|
3
|
+
const { getEnv, AVP } = require('./shared')
|
|
4
4
|
|
|
5
5
|
function injectProcessEnv() {
|
|
6
6
|
return {
|
|
@@ -8,10 +8,10 @@ function injectProcessEnv() {
|
|
|
8
8
|
config: () => {
|
|
9
9
|
const xrEnv = getEnv()
|
|
10
10
|
const output =
|
|
11
|
-
xrEnv
|
|
11
|
+
xrEnv === AVP
|
|
12
12
|
? {
|
|
13
|
-
entryFileNames: `assets/[name]-[hash].${
|
|
14
|
-
chunkFileNames: `assets/[name]-[hash].${
|
|
13
|
+
entryFileNames: `assets/[name]-[hash].${AVP}.js`, // no share js entry
|
|
14
|
+
chunkFileNames: `assets/[name]-[hash].${AVP}.js`, // no share js chunk
|
|
15
15
|
assetFileNames: 'assets/[name]-[hash][extname]', // shared css image
|
|
16
16
|
}
|
|
17
17
|
: {}
|
|
@@ -22,7 +22,7 @@ function injectProcessEnv() {
|
|
|
22
22
|
'import.meta.env.XR_ENV': JSON.stringify(xrEnv), // visible in development
|
|
23
23
|
},
|
|
24
24
|
build: {
|
|
25
|
-
emptyOutDir: xrEnv
|
|
25
|
+
emptyOutDir: xrEnv !== AVP, // keep dist folder
|
|
26
26
|
rollupOptions: { output },
|
|
27
27
|
commonjsOptions: {
|
|
28
28
|
include: [/@webspatial\/react-sdk\/.*/, /node_modules/],
|
|
@@ -44,7 +44,7 @@ function injectProcessEnv() {
|
|
|
44
44
|
renderStart(outputOptions) {
|
|
45
45
|
// rename index.html to index.avp.html
|
|
46
46
|
const xrEnv = getEnv()
|
|
47
|
-
if (xrEnv
|
|
47
|
+
if (xrEnv !== AVP) {
|
|
48
48
|
return
|
|
49
49
|
}
|
|
50
50
|
|
|
@@ -61,7 +61,7 @@ function injectProcessEnv() {
|
|
|
61
61
|
},
|
|
62
62
|
writeBundle(outputOptions) {
|
|
63
63
|
const xrEnv = getEnv()
|
|
64
|
-
if (xrEnv
|
|
64
|
+
if (xrEnv !== AVP) {
|
|
65
65
|
return
|
|
66
66
|
}
|
|
67
67
|
const outDir = outputOptions.dir || 'dist'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webspatial/react-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "React components for WebSpatial",
|
|
5
5
|
"main": "npm/index.js",
|
|
6
6
|
"types": "npm/index.d.ts",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"lodash.isequal": "^4.5.0",
|
|
36
36
|
"loglevel": "^1.9.1",
|
|
37
37
|
"three": "^0.170.0",
|
|
38
|
-
"@webspatial/react-sdk": "0.0.
|
|
38
|
+
"@webspatial/react-sdk": "0.0.3",
|
|
39
39
|
"@webspatial/core-sdk": "0.0.1-alpha"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"webpack": "^5.98.0"
|
|
69
69
|
},
|
|
70
70
|
"scripts": {
|
|
71
|
-
"test": "
|
|
71
|
+
"test": "tsc -p ./tsconfig.json",
|
|
72
72
|
"dev": "node esbuild.mjs --watch",
|
|
73
73
|
"build": "node esbuild.mjs",
|
|
74
74
|
"start": "npm run dev",
|