create-blocklet 0.4.8 → 0.4.11
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 +1 -1
- package/templates/react-dapp/craco.config.js +18 -1
- package/templates/react-gun-dapp/craco.config.js +10 -1
- package/templates/react-static/craco.config.js +18 -1
- package/templates/solidjs-dapp/package.json +2 -2
- package/templates/solidjs-dapp/vite.config.js +16 -5
- package/templates/solidjs-static/package.json +2 -2
- package/templates/solidjs-static/vite.config.js +18 -7
- package/templates/svelte-dapp/package.json +2 -2
- package/templates/svelte-dapp/vite.config.js +18 -7
- package/templates/svelte-static/package.json +2 -2
- package/templates/svelte-static/vite.config.js +18 -7
- package/templates/vue-dapp/package.json +1 -1
- package/templates/vue-dapp/vite.config.js +20 -9
- package/templates/vue-static/package.json +2 -2
- package/templates/vue-static/vite.config.js +18 -7
- package/templates/vue2-dapp/vue.config.js +6 -2
- package/templates/vue2-static/vue.config.js +6 -2
package/package.json
CHANGED
|
@@ -3,12 +3,29 @@ require('dotenv-flow').config();
|
|
|
3
3
|
const port = process.env.BLOCKLET_PORT || process.env.PORT || 3000;
|
|
4
4
|
const apiPort = process.env.API_PORT || 3030;
|
|
5
5
|
|
|
6
|
+
const whenDev = process.env.NODE_ENV === 'development';
|
|
7
|
+
|
|
8
|
+
const mountPoint = process.env.BLOCKLET_DEV_MOUNT_POINT || '';
|
|
9
|
+
|
|
10
|
+
const webpackConfig = whenDev
|
|
11
|
+
? {
|
|
12
|
+
configure: {
|
|
13
|
+
output: {
|
|
14
|
+
publicPath: '', // When the dev mode as component, this line required
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
}
|
|
18
|
+
: {};
|
|
19
|
+
|
|
6
20
|
module.exports = {
|
|
21
|
+
webpack: {
|
|
22
|
+
...webpackConfig,
|
|
23
|
+
},
|
|
7
24
|
devServer: {
|
|
8
25
|
port,
|
|
9
26
|
client: {
|
|
10
27
|
// If you want to development this blocklet without blocklet-server, you can delete next line, otherwise the hot reload will be failed.
|
|
11
|
-
webSocketURL:
|
|
28
|
+
webSocketURL: `wss://0.0.0.0${mountPoint}/ws`,
|
|
12
29
|
},
|
|
13
30
|
proxy: {
|
|
14
31
|
'/api': {
|
|
@@ -3,12 +3,16 @@ require('dotenv-flow').config();
|
|
|
3
3
|
const port = process.env.BLOCKLET_PORT || process.env.PORT || 3000;
|
|
4
4
|
const apiPort = process.env.API_PORT || 3030;
|
|
5
5
|
|
|
6
|
+
const whenDev = process.env.NODE_ENV === 'development';
|
|
7
|
+
|
|
8
|
+
const mountPoint = process.env.BLOCKLET_DEV_MOUNT_POINT || '';
|
|
9
|
+
|
|
6
10
|
module.exports = {
|
|
7
11
|
devServer: {
|
|
8
12
|
port,
|
|
9
13
|
client: {
|
|
10
14
|
// If you want to development this blocklet without blocklet-server, you can delete next line, otherwise the hot reload will be failed.
|
|
11
|
-
webSocketURL:
|
|
15
|
+
webSocketURL: `wss://0.0.0.0${mountPoint}/ws`,
|
|
12
16
|
},
|
|
13
17
|
proxy: [
|
|
14
18
|
{
|
|
@@ -27,6 +31,11 @@ module.exports = {
|
|
|
27
31
|
module: {
|
|
28
32
|
noParse: /gun\.js$/,
|
|
29
33
|
},
|
|
34
|
+
output: whenDev
|
|
35
|
+
? {
|
|
36
|
+
publicPath: '', // When the dev mode as component, this line required
|
|
37
|
+
}
|
|
38
|
+
: {},
|
|
30
39
|
},
|
|
31
40
|
},
|
|
32
41
|
};
|
|
@@ -1,11 +1,28 @@
|
|
|
1
1
|
const port = process.env.BLOCKLET_PORT || process.env.PORT || 3000;
|
|
2
2
|
|
|
3
|
+
const whenDev = process.env.NODE_ENV === 'development';
|
|
4
|
+
|
|
5
|
+
const mountPoint = process.env.BLOCKLET_DEV_MOUNT_POINT || '';
|
|
6
|
+
|
|
7
|
+
const webpackConfig = whenDev
|
|
8
|
+
? {
|
|
9
|
+
configure: {
|
|
10
|
+
output: {
|
|
11
|
+
publicPath: '', // When the dev mode as component, this line required
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
}
|
|
15
|
+
: {};
|
|
16
|
+
|
|
3
17
|
module.exports = {
|
|
18
|
+
webpack: {
|
|
19
|
+
...webpackConfig,
|
|
20
|
+
},
|
|
4
21
|
devServer: {
|
|
5
22
|
port,
|
|
6
23
|
client: {
|
|
7
24
|
// If you want to development this blocklet without blocklet-server, you can delete next line, otherwise the hot reload will be failed.
|
|
8
|
-
webSocketURL:
|
|
25
|
+
webSocketURL: `wss://0.0.0.0${mountPoint}/ws`,
|
|
9
26
|
},
|
|
10
27
|
},
|
|
11
28
|
};
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"npm-run-all": "^4.1.5",
|
|
31
31
|
"prettier": "^2.7.1",
|
|
32
32
|
"vite": "^2.9.12",
|
|
33
|
-
"vite-plugin-blocklet": "^0.1.2",
|
|
34
33
|
"vite-plugin-html": "^3.2.0",
|
|
35
|
-
"vite-plugin-solid": "^2.2.6"
|
|
34
|
+
"vite-plugin-solid": "^2.2.6",
|
|
35
|
+
"vite-plugin-wss-hmr": "^0.4.11"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@arcblock/did-auth": "^1.17.0",
|
|
@@ -1,26 +1,37 @@
|
|
|
1
1
|
import { defineConfig, loadEnv } from 'vite';
|
|
2
2
|
import solidPlugin from 'vite-plugin-solid';
|
|
3
3
|
import { createHtmlPlugin } from 'vite-plugin-html';
|
|
4
|
-
import
|
|
4
|
+
import createWssHmrPlugin from 'vite-plugin-wss-hmr';
|
|
5
5
|
|
|
6
|
-
export default ({ mode }) => {
|
|
6
|
+
export default defineConfig(async ({ mode }) => {
|
|
7
7
|
const envMap = loadEnv(mode, process.cwd(), '');
|
|
8
8
|
const port = process.env.BLOCKLET_PORT || 3000;
|
|
9
9
|
const apiPort = envMap.API_PORT || 3030;
|
|
10
10
|
|
|
11
|
+
const whenDev = mode === 'development';
|
|
12
|
+
|
|
13
|
+
let mountPoint = process.env.BLOCKLET_DEV_MOUNT_POINT || '';
|
|
14
|
+
|
|
15
|
+
if (mountPoint && !mountPoint.endsWith('/')) {
|
|
16
|
+
mountPoint = `${mountPoint}/`;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const base = whenDev ? mountPoint : process.env.BASE_URL || '/';
|
|
20
|
+
|
|
11
21
|
return defineConfig({
|
|
22
|
+
base,
|
|
12
23
|
plugins: [
|
|
13
24
|
solidPlugin(),
|
|
14
25
|
createHtmlPlugin({
|
|
15
26
|
minify: true,
|
|
16
27
|
inject: {
|
|
17
28
|
data: {
|
|
18
|
-
base
|
|
29
|
+
base,
|
|
19
30
|
title: envMap.APP_TITLE,
|
|
20
31
|
},
|
|
21
32
|
},
|
|
22
33
|
}),
|
|
23
|
-
|
|
34
|
+
await createWssHmrPlugin(),
|
|
24
35
|
],
|
|
25
36
|
build: {
|
|
26
37
|
target: 'esnext',
|
|
@@ -33,4 +44,4 @@ export default ({ mode }) => {
|
|
|
33
44
|
},
|
|
34
45
|
},
|
|
35
46
|
});
|
|
36
|
-
};
|
|
47
|
+
});
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"lint-staged": "^12.5.0",
|
|
25
25
|
"prettier": "^2.7.1",
|
|
26
26
|
"vite": "^2.9.12",
|
|
27
|
-
"vite-plugin-blocklet": "^0.1.2",
|
|
28
27
|
"vite-plugin-html": "^3.2.0",
|
|
29
|
-
"vite-plugin-solid": "^2.2.6"
|
|
28
|
+
"vite-plugin-solid": "^2.2.6",
|
|
29
|
+
"vite-plugin-wss-hmr": "^0.4.11"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"solid-js": "^1.4.4"
|
|
@@ -1,25 +1,36 @@
|
|
|
1
1
|
import { defineConfig, loadEnv } from 'vite';
|
|
2
2
|
import solidPlugin from 'vite-plugin-solid';
|
|
3
3
|
import { createHtmlPlugin } from 'vite-plugin-html';
|
|
4
|
-
import
|
|
4
|
+
import createWssHmrPlugin from 'vite-plugin-wss-hmr';
|
|
5
5
|
|
|
6
|
-
export default ({ mode }) => {
|
|
6
|
+
export default defineConfig(async ({ mode }) => {
|
|
7
7
|
const envMap = loadEnv(mode, process.cwd(), '');
|
|
8
8
|
const port = process.env.BLOCKLET_PORT || 3000;
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
const whenDev = mode === 'development';
|
|
11
|
+
|
|
12
|
+
let mountPoint = process.env.BLOCKLET_DEV_MOUNT_POINT || '';
|
|
13
|
+
|
|
14
|
+
if (mountPoint && !mountPoint.endsWith('/')) {
|
|
15
|
+
mountPoint = `${mountPoint}/`;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const base = whenDev ? mountPoint : process.env.BASE_URL || '/';
|
|
19
|
+
|
|
20
|
+
return {
|
|
21
|
+
base,
|
|
11
22
|
plugins: [
|
|
12
23
|
solidPlugin(),
|
|
13
24
|
createHtmlPlugin({
|
|
14
25
|
minify: true,
|
|
15
26
|
inject: {
|
|
16
27
|
data: {
|
|
17
|
-
base
|
|
28
|
+
base,
|
|
18
29
|
title: envMap.APP_TITLE,
|
|
19
30
|
},
|
|
20
31
|
},
|
|
21
32
|
}),
|
|
22
|
-
|
|
33
|
+
await createWssHmrPlugin(),
|
|
23
34
|
],
|
|
24
35
|
build: {
|
|
25
36
|
target: 'esnext',
|
|
@@ -28,5 +39,5 @@ export default ({ mode }) => {
|
|
|
28
39
|
server: {
|
|
29
40
|
port,
|
|
30
41
|
},
|
|
31
|
-
}
|
|
32
|
-
};
|
|
42
|
+
};
|
|
43
|
+
});
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"prettier": "^2.7.1",
|
|
44
44
|
"svelte": "^3.48.0",
|
|
45
45
|
"vite": "^2.9.12",
|
|
46
|
-
"vite-plugin-
|
|
47
|
-
"vite-plugin-
|
|
46
|
+
"vite-plugin-html": "^3.2.0",
|
|
47
|
+
"vite-plugin-wss-hmr": "^0.4.11"
|
|
48
48
|
},
|
|
49
49
|
"lint-staged": {
|
|
50
50
|
"*.{mjs,js,vue}": [
|
|
@@ -1,27 +1,38 @@
|
|
|
1
1
|
import { defineConfig, loadEnv } from 'vite';
|
|
2
2
|
import { svelte } from '@sveltejs/vite-plugin-svelte';
|
|
3
3
|
import { createHtmlPlugin } from 'vite-plugin-html';
|
|
4
|
-
import
|
|
4
|
+
import createWssHmrPlugin from 'vite-plugin-wss-hmr';
|
|
5
5
|
|
|
6
6
|
// https://vitejs.dev/config/
|
|
7
|
-
export default ({ mode }) => {
|
|
7
|
+
export default defineConfig(async ({ mode }) => {
|
|
8
8
|
const envMap = loadEnv(mode, process.cwd(), '');
|
|
9
9
|
const port = process.env.BLOCKLET_PORT || 3000;
|
|
10
10
|
const apiPort = envMap.API_PORT || 3030;
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
const whenDev = mode === 'development';
|
|
13
|
+
|
|
14
|
+
let mountPoint = process.env.BLOCKLET_DEV_MOUNT_POINT || '';
|
|
15
|
+
|
|
16
|
+
if (mountPoint && !mountPoint.endsWith('/')) {
|
|
17
|
+
mountPoint = `${mountPoint}/`;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const base = whenDev ? mountPoint : process.env.BASE_URL || '/';
|
|
21
|
+
|
|
22
|
+
return {
|
|
23
|
+
base,
|
|
13
24
|
plugins: [
|
|
14
25
|
svelte(),
|
|
15
26
|
createHtmlPlugin({
|
|
16
27
|
minify: true,
|
|
17
28
|
inject: {
|
|
18
29
|
data: {
|
|
19
|
-
base
|
|
30
|
+
base,
|
|
20
31
|
title: envMap.APP_TITLE,
|
|
21
32
|
},
|
|
22
33
|
},
|
|
23
34
|
}),
|
|
24
|
-
|
|
35
|
+
await createWssHmrPlugin(),
|
|
25
36
|
],
|
|
26
37
|
server: {
|
|
27
38
|
port,
|
|
@@ -29,5 +40,5 @@ export default ({ mode }) => {
|
|
|
29
40
|
'/api': `http://127.0.0.1:${apiPort}`,
|
|
30
41
|
},
|
|
31
42
|
},
|
|
32
|
-
}
|
|
33
|
-
};
|
|
43
|
+
};
|
|
44
|
+
});
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"prettier": "^2.7.1",
|
|
26
26
|
"svelte": "^3.48.0",
|
|
27
27
|
"vite": "^2.9.12",
|
|
28
|
-
"vite-plugin-
|
|
29
|
-
"vite-plugin-
|
|
28
|
+
"vite-plugin-html": "^3.2.0",
|
|
29
|
+
"vite-plugin-wss-hmr": "^0.4.11"
|
|
30
30
|
},
|
|
31
31
|
"lint-staged": {
|
|
32
32
|
"*.{mjs,js,vue}": [
|
|
@@ -1,29 +1,40 @@
|
|
|
1
1
|
import { defineConfig, loadEnv } from 'vite';
|
|
2
2
|
import { svelte } from '@sveltejs/vite-plugin-svelte';
|
|
3
3
|
import { createHtmlPlugin } from 'vite-plugin-html';
|
|
4
|
-
import
|
|
4
|
+
import createWssHmrPlugin from 'vite-plugin-wss-hmr';
|
|
5
5
|
|
|
6
6
|
// https://vitejs.dev/config/
|
|
7
|
-
export default ({ mode }) => {
|
|
7
|
+
export default defineConfig(async ({ mode }) => {
|
|
8
8
|
const envMap = loadEnv(mode, process.cwd(), '');
|
|
9
9
|
const port = process.env.BLOCKLET_PORT || 3000;
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
const whenDev = mode === 'development';
|
|
12
|
+
|
|
13
|
+
let mountPoint = process.env.BLOCKLET_DEV_MOUNT_POINT || '';
|
|
14
|
+
|
|
15
|
+
if (mountPoint && !mountPoint.endsWith('/')) {
|
|
16
|
+
mountPoint = `${mountPoint}/`;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const base = whenDev ? mountPoint : process.env.BASE_URL || '/';
|
|
20
|
+
|
|
21
|
+
return {
|
|
22
|
+
base,
|
|
12
23
|
plugins: [
|
|
13
24
|
svelte(),
|
|
14
25
|
createHtmlPlugin({
|
|
15
26
|
minify: true,
|
|
16
27
|
inject: {
|
|
17
28
|
data: {
|
|
18
|
-
base
|
|
29
|
+
base,
|
|
19
30
|
title: envMap.APP_TITLE,
|
|
20
31
|
},
|
|
21
32
|
},
|
|
22
33
|
}),
|
|
23
|
-
|
|
34
|
+
await createWssHmrPlugin(),
|
|
24
35
|
],
|
|
25
36
|
server: {
|
|
26
37
|
port,
|
|
27
38
|
},
|
|
28
|
-
}
|
|
29
|
-
};
|
|
39
|
+
};
|
|
40
|
+
});
|
|
@@ -1,28 +1,39 @@
|
|
|
1
1
|
import { defineConfig, loadEnv } from 'vite';
|
|
2
2
|
import vue from '@vitejs/plugin-vue';
|
|
3
3
|
import { createHtmlPlugin } from 'vite-plugin-html';
|
|
4
|
-
import
|
|
4
|
+
import createWssHmrPlugin from 'vite-plugin-wss-hmr';
|
|
5
5
|
|
|
6
6
|
// https://vitejs.dev/config/
|
|
7
|
-
export default ({ mode }) => {
|
|
8
|
-
const port = process.env.BLOCKLET_PORT || 3000;
|
|
9
|
-
|
|
7
|
+
export default defineConfig(async ({ mode }) => {
|
|
10
8
|
const envMap = loadEnv(mode, process.cwd(), '');
|
|
11
9
|
const apiPort = envMap.API_PORT || 3030;
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
const port = process.env.BLOCKLET_PORT || 3000;
|
|
12
|
+
|
|
13
|
+
const whenDev = mode === 'development';
|
|
14
|
+
|
|
15
|
+
let mountPoint = process.env.BLOCKLET_DEV_MOUNT_POINT || '';
|
|
16
|
+
|
|
17
|
+
if (mountPoint && !mountPoint.endsWith('/')) {
|
|
18
|
+
mountPoint = `${mountPoint}/`;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const base = whenDev ? mountPoint : process.env.BASE_URL || '/';
|
|
22
|
+
|
|
23
|
+
return {
|
|
24
|
+
base,
|
|
14
25
|
plugins: [
|
|
15
26
|
vue(),
|
|
16
27
|
createHtmlPlugin({
|
|
17
28
|
minify: true,
|
|
18
29
|
inject: {
|
|
19
30
|
data: {
|
|
20
|
-
base
|
|
31
|
+
base,
|
|
21
32
|
title: envMap.APP_TITLE,
|
|
22
33
|
},
|
|
23
34
|
},
|
|
24
35
|
}),
|
|
25
|
-
|
|
36
|
+
await createWssHmrPlugin(),
|
|
26
37
|
],
|
|
27
38
|
server: {
|
|
28
39
|
port,
|
|
@@ -30,5 +41,5 @@ export default ({ mode }) => {
|
|
|
30
41
|
'/api': `http://127.0.0.1:${apiPort}`,
|
|
31
42
|
},
|
|
32
43
|
},
|
|
33
|
-
}
|
|
34
|
-
};
|
|
44
|
+
};
|
|
45
|
+
});
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"lint-staged": "^12.5.0",
|
|
27
27
|
"prettier": "^2.7.1",
|
|
28
28
|
"vite": "^2.9.12",
|
|
29
|
-
"vite-plugin-
|
|
30
|
-
"vite-plugin-
|
|
29
|
+
"vite-plugin-html": "^3.2.0",
|
|
30
|
+
"vite-plugin-wss-hmr": "^0.4.11"
|
|
31
31
|
},
|
|
32
32
|
"lint-staged": {
|
|
33
33
|
"*.{mjs,js,vue}": [
|
|
@@ -1,29 +1,40 @@
|
|
|
1
1
|
import { defineConfig, loadEnv } from 'vite';
|
|
2
2
|
import vue from '@vitejs/plugin-vue';
|
|
3
3
|
import { createHtmlPlugin } from 'vite-plugin-html';
|
|
4
|
-
import
|
|
4
|
+
import createWssHmrPlugin from 'vite-plugin-wss-hmr';
|
|
5
5
|
|
|
6
6
|
// https://vitejs.dev/config/
|
|
7
|
-
export default ({ mode }) => {
|
|
7
|
+
export default defineConfig(async ({ mode }) => {
|
|
8
8
|
const envMap = loadEnv(mode, process.cwd(), '');
|
|
9
9
|
const port = process.env.BLOCKLET_PORT || 3000;
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
const whenDev = mode === 'development';
|
|
12
|
+
|
|
13
|
+
let mountPoint = process.env.BLOCKLET_DEV_MOUNT_POINT || '';
|
|
14
|
+
|
|
15
|
+
if (mountPoint && !mountPoint.endsWith('/')) {
|
|
16
|
+
mountPoint = `${mountPoint}/`;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const base = whenDev ? mountPoint : process.env.BASE_URL || '/';
|
|
20
|
+
|
|
21
|
+
return {
|
|
22
|
+
base,
|
|
12
23
|
plugins: [
|
|
13
24
|
vue(),
|
|
14
25
|
createHtmlPlugin({
|
|
15
26
|
minify: true,
|
|
16
27
|
inject: {
|
|
17
28
|
data: {
|
|
18
|
-
base
|
|
29
|
+
base,
|
|
19
30
|
title: envMap.APP_TITLE,
|
|
20
31
|
},
|
|
21
32
|
},
|
|
22
33
|
}),
|
|
23
|
-
|
|
34
|
+
await createWssHmrPlugin(),
|
|
24
35
|
],
|
|
25
36
|
server: {
|
|
26
37
|
port,
|
|
27
38
|
},
|
|
28
|
-
}
|
|
29
|
-
};
|
|
39
|
+
};
|
|
40
|
+
});
|
|
@@ -3,14 +3,18 @@ require('dotenv-flow').config();
|
|
|
3
3
|
const port = process.env.BLOCKLET_PORT || process.env.PORT || 3000;
|
|
4
4
|
const apiPort = process.env.API_PORT || 3030;
|
|
5
5
|
|
|
6
|
+
const whenDev = process.env.NODE_ENV === 'development';
|
|
7
|
+
|
|
8
|
+
const mountPoint = process.env.BLOCKLET_DEV_MOUNT_POINT || '';
|
|
9
|
+
|
|
6
10
|
module.exports = {
|
|
7
|
-
publicPath: process.env.PUBLIC_PATH || '/',
|
|
11
|
+
publicPath: whenDev ? '' : process.env.PUBLIC_PATH || '/',
|
|
8
12
|
devServer: {
|
|
9
13
|
port,
|
|
10
14
|
allowedHosts: 'all',
|
|
11
15
|
client: {
|
|
12
16
|
// If you want to development this blocklet without blocklet-server, you can delete next line, otherwise the hot reload will be failed.
|
|
13
|
-
webSocketURL:
|
|
17
|
+
webSocketURL: `wss://0.0.0.0${mountPoint}/ws`,
|
|
14
18
|
},
|
|
15
19
|
proxy: {
|
|
16
20
|
'/api': {
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
const port = process.env.BLOCKLET_PORT || process.env.PORT || 3000;
|
|
2
2
|
|
|
3
|
+
const whenDev = process.env.NODE_ENV === 'development';
|
|
4
|
+
|
|
5
|
+
const mountPoint = process.env.BLOCKLET_DEV_MOUNT_POINT || '';
|
|
6
|
+
|
|
3
7
|
module.exports = {
|
|
4
|
-
publicPath: process.env.PUBLIC_PATH || '/',
|
|
8
|
+
publicPath: whenDev ? '' : process.env.PUBLIC_PATH || '/',
|
|
5
9
|
devServer: {
|
|
6
10
|
port,
|
|
7
11
|
allowedHosts: 'all',
|
|
8
12
|
client: {
|
|
9
13
|
// If you want to development this blocklet without blocklet-server, you can delete next line, otherwise the hot reload will be failed.
|
|
10
|
-
webSocketURL:
|
|
14
|
+
webSocketURL: `wss://0.0.0.0${mountPoint}/ws`,
|
|
11
15
|
},
|
|
12
16
|
},
|
|
13
17
|
};
|