w-threejs-vue 1.0.0
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/.editorconfig +9 -0
- package/.eslintignore +3 -0
- package/.eslintrc.js +55 -0
- package/.jsdoc +25 -0
- package/LICENSE +21 -0
- package/README.md +39 -0
- package/SECURITY.md +5 -0
- package/babel.config.js +15 -0
- package/dist/w-threejs-vue.umd.js +26 -0
- package/dist/w-threejs-vue.umd.js.map +1 -0
- package/docs/examples/app.html +66 -0
- package/docs/examples/app.umd.js +31 -0
- package/docs/examples/app.umd.js.map +1 -0
- package/docs/examples/ex-AppBasicAutoRotateDeg.html +190 -0
- package/docs/examples/ex-AppBasicBackgroundColor.html +189 -0
- package/docs/examples/ex-AppBasicSize.html +170 -0
- package/docs/examples/ex-AppBasicUploadStl.html +237 -0
- package/docs/examples/ex-AppBasicUseAutoRotate.html +189 -0
- package/docs/examples/ex-AppCmCameraFar.html +191 -0
- package/docs/examples/ex-AppCmCameraFov.html +191 -0
- package/docs/examples/ex-AppCmCameraNear.html +191 -0
- package/docs/examples/ex-AppCmCameraOrthographicRatio.html +191 -0
- package/docs/examples/ex-AppCmCameraType.html +190 -0
- package/docs/examples/ex-AppCmGetCameraViewAngle.html +218 -0
- package/docs/examples/ex-AppCmSetCameraAzimuthAngle.html +190 -0
- package/docs/examples/ex-AppCmSetCameraPolarAngle.html +190 -0
- package/docs/examples/ex-AppCmSetCameraViewAngle.html +194 -0
- package/docs/examples/ex-AppHpHelperAxesLengthRatio.html +189 -0
- package/docs/examples/ex-AppHpHelperGridDensity.html +189 -0
- package/docs/examples/ex-AppHpHelperGridLengthRatio.html +189 -0
- package/docs/examples/ex-AppHpHelperGridPositionRatioZ.html +189 -0
- package/docs/examples/ex-AppHpUseHelperAxes.html +189 -0
- package/docs/examples/ex-AppHpUseHelperGrid.html +189 -0
- package/docs/examples/ex-AppLgLegnedBackgroundColor.html +189 -0
- package/docs/examples/ex-AppLgLegnedHeight.html +189 -0
- package/docs/examples/ex-AppLgLegnedHeightMax.html +189 -0
- package/docs/examples/ex-AppLtLightAmbientColor.html +189 -0
- package/docs/examples/ex-AppLtLightDirectionColor.html +191 -0
- package/docs/examples/ex-AppLtLightDirectionIntensity.html +191 -0
- package/docs/examples/ex-AppLtLightDirectionPos.html +191 -0
- package/docs/examples/ex-AppLtLightPointColor.html +192 -0
- package/docs/examples/ex-AppLtLightPointDecay.html +192 -0
- package/docs/examples/ex-AppLtLightPointDistance.html +192 -0
- package/docs/examples/ex-AppLtLightPointIntensity.html +192 -0
- package/docs/examples/ex-AppLtLightPointPoss.html +192 -0
- package/docs/examples/ex-AppLtUseLightAmbient.html +191 -0
- package/docs/examples/ex-AppLtUseLightDirection.html +191 -0
- package/docs/examples/ex-AppLtUseLightPoint.html +191 -0
- package/docs/examples/ex-AppMhGetMeshsInfor.html +198 -0
- package/docs/examples/ex-AppMhSetMeshColor.html +190 -0
- package/docs/examples/ex-AppMhSetMeshLabelText.html +190 -0
- package/docs/examples/ex-AppMhSetMeshLabelTextColor.html +190 -0
- package/docs/examples/ex-AppMhSetMeshLabelTextFontFamily.html +190 -0
- package/docs/examples/ex-AppMhSetMeshLabelTextFontSize.html +190 -0
- package/docs/examples/ex-AppMhSetMeshLabelVisible.html +198 -0
- package/docs/examples/ex-AppMhSetMeshVisible.html +198 -0
- package/docs/examples/ex-AppMuMenuIcons.html +217 -0
- package/docs/examples/ex-AppMuMenuTooltips.html +218 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.eot +0 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.woff +0 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.eot +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.woff +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +978 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +1049 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
- package/docs/index.html +84 -0
- package/docs/module-WThreejsVue.html +216 -0
- package/docs/scripts/collapse.js +39 -0
- package/docs/scripts/commonNav.js +28 -0
- package/docs/scripts/linenumber.js +25 -0
- package/docs/scripts/nav.js +12 -0
- package/docs/scripts/polyfill.js +4 -0
- package/docs/scripts/prettify/Apache-License-2.0.txt +202 -0
- package/docs/scripts/prettify/lang-css.js +2 -0
- package/docs/scripts/prettify/prettify.js +28 -0
- package/docs/scripts/search.js +99 -0
- package/docs/styles/jsdoc.css +776 -0
- package/docs/styles/prettify.css +80 -0
- package/package.json +74 -0
- package/public/index.html +42 -0
- package/src/App.vue +574 -0
- package/src/AppBasicAutoRotateDeg.vue +102 -0
- package/src/AppBasicBackgroundColor.vue +101 -0
- package/src/AppBasicSize.vue +90 -0
- package/src/AppBasicUploadStl.vue +159 -0
- package/src/AppBasicUseAutoRotate.vue +101 -0
- package/src/AppCmCameraFar.vue +103 -0
- package/src/AppCmCameraFov.vue +103 -0
- package/src/AppCmCameraNear.vue +103 -0
- package/src/AppCmCameraOrthographicRatio.vue +103 -0
- package/src/AppCmCameraType.vue +102 -0
- package/src/AppCmGetCameraViewAngle.vue +135 -0
- package/src/AppCmSetCameraAzimuthAngle.vue +104 -0
- package/src/AppCmSetCameraPolarAngle.vue +104 -0
- package/src/AppCmSetCameraViewAngle.vue +105 -0
- package/src/AppHpHelperAxesLengthRatio.vue +101 -0
- package/src/AppHpHelperGridDensity.vue +101 -0
- package/src/AppHpHelperGridLengthRatio.vue +101 -0
- package/src/AppHpHelperGridPositionRatioZ.vue +101 -0
- package/src/AppHpUseHelperAxes.vue +101 -0
- package/src/AppHpUseHelperGrid.vue +101 -0
- package/src/AppLgLegnedBackgroundColor.vue +101 -0
- package/src/AppLgLegnedHeight.vue +101 -0
- package/src/AppLgLegnedHeightMax.vue +101 -0
- package/src/AppLtLightAmbientColor.vue +101 -0
- package/src/AppLtLightDirectionColor.vue +103 -0
- package/src/AppLtLightDirectionIntensity.vue +103 -0
- package/src/AppLtLightDirectionPos.vue +103 -0
- package/src/AppLtLightPointColor.vue +104 -0
- package/src/AppLtLightPointDecay.vue +104 -0
- package/src/AppLtLightPointDistance.vue +104 -0
- package/src/AppLtLightPointIntensity.vue +104 -0
- package/src/AppLtLightPointPoss.vue +104 -0
- package/src/AppLtUseLightAmbient.vue +103 -0
- package/src/AppLtUseLightDirection.vue +103 -0
- package/src/AppLtUseLightPoint.vue +103 -0
- package/src/AppMhGetMeshsInfor.vue +112 -0
- package/src/AppMhSetMeshColor.vue +104 -0
- package/src/AppMhSetMeshLabelText.vue +104 -0
- package/src/AppMhSetMeshLabelTextColor.vue +104 -0
- package/src/AppMhSetMeshLabelTextFontFamily.vue +104 -0
- package/src/AppMhSetMeshLabelTextFontSize.vue +104 -0
- package/src/AppMhSetMeshLabelVisible.vue +106 -0
- package/src/AppMhSetMeshVisible.vue +106 -0
- package/src/AppMuMenuIcons.vue +130 -0
- package/src/AppMuMenuTooltips.vue +131 -0
- package/src/components/WThreejsVue.vue +955 -0
- package/src/js/addStl.mjs +83 -0
- package/src/js/getCsrdFromMeshs.mjs +85 -0
- package/src/js/plot3d.mjs +1407 -0
- package/src/main.js +8 -0
- package/test/all.test.mjs +10 -0
- package/toolg/addVersion.mjs +4 -0
- package/toolg/cleanFolder.mjs +4 -0
- package/toolg/gDistApp.mjs +38 -0
- package/toolg/gDistRollupComps.mjs +22 -0
- package/toolg/gDocExams.mjs +47 -0
- package/toolg/gExtractHtml.mjs +159 -0
- package/toolg/modifyReadme.mjs +4 -0
- package/vue.config.js +21 -0
package/src/main.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import rollupVueToHtml from 'w-package-tools/src/rollupVueToHtml.mjs'
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
let opt = {
|
|
5
|
+
title: `w-threejs-vue`,
|
|
6
|
+
head: `
|
|
7
|
+
|
|
8
|
+
<!-- rollupVueToHtml已自動添加@babel/polyfill與vue -->
|
|
9
|
+
|
|
10
|
+
<!-- fontawesome -->
|
|
11
|
+
<link href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.4.2/css/all.min.css" rel="stylesheet">
|
|
12
|
+
|
|
13
|
+
<!-- mdi, 各組件使用mdi/js故不需引用 -->
|
|
14
|
+
<link _href="https://cdn.jsdelivr.net/npm/@mdi/font@7.2.96/css/materialdesignicons.min.css" rel="stylesheet">
|
|
15
|
+
|
|
16
|
+
<!-- google, 各組件使用mdi/js故不需引用 -->
|
|
17
|
+
<link _href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900" rel="stylesheet">
|
|
18
|
+
<link _href="https://fonts.googleapis.com/css?family=Material+Icons" rel="stylesheet">
|
|
19
|
+
|
|
20
|
+
<!-- lodash -->
|
|
21
|
+
<script src="https://cdn.jsdelivr.net/npm/lodash@latest/lodash.min.js"></script>
|
|
22
|
+
|
|
23
|
+
<!-- wsemi -->
|
|
24
|
+
<script src="https://cdn.jsdelivr.net/npm/wsemi@latest/dist/wsemi.umd.min.js"></script>
|
|
25
|
+
|
|
26
|
+
<!-- data -->
|
|
27
|
+
<script src="https://cdn.jsdelivr.net/npm/w-demores@1.0.23/res/data/dataRain.js"></script>
|
|
28
|
+
<script src="https://cdn.jsdelivr.net/npm/w-demores@1.0.23/res/data/dataRainClip.js"></script>
|
|
29
|
+
|
|
30
|
+
`,
|
|
31
|
+
newVue: ``,
|
|
32
|
+
globals: {
|
|
33
|
+
},
|
|
34
|
+
external: [
|
|
35
|
+
],
|
|
36
|
+
}
|
|
37
|
+
rollupVueToHtml('./src/App.vue', './docs/examples/app.html', opt)
|
|
38
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import rollupFiles from 'w-package-tools/src/rollupFiles.mjs'
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
let fdSrc = './src/components/'
|
|
5
|
+
let fdTar = './dist'
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
rollupFiles({
|
|
9
|
+
fns: 'WThreejsVue.vue',
|
|
10
|
+
fdSrc,
|
|
11
|
+
fdTar,
|
|
12
|
+
format: 'umd',
|
|
13
|
+
//nameDistType: 'kebabCase',
|
|
14
|
+
hookNameDist: () => {
|
|
15
|
+
return 'w-threejs-vue'
|
|
16
|
+
},
|
|
17
|
+
globals: {
|
|
18
|
+
},
|
|
19
|
+
external: [
|
|
20
|
+
],
|
|
21
|
+
})
|
|
22
|
+
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import _ from 'lodash-es'
|
|
2
|
+
import fs from 'fs'
|
|
3
|
+
import getFiles from 'w-package-tools/src/getFiles.mjs'
|
|
4
|
+
import getPks from 'w-package-tools/src/getPks.mjs'
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
let fdSrc = './test-html/'
|
|
8
|
+
let fdTar = './docs/examples/'
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
async function main() {
|
|
12
|
+
//把example裡面cdn更換, 再複製到docs的example內, 作為日後發佈為靜態網站
|
|
13
|
+
|
|
14
|
+
//pks
|
|
15
|
+
let pks = getPks()
|
|
16
|
+
|
|
17
|
+
//cdn
|
|
18
|
+
let cdn = `<script src="https://cdn.jsdelivr.net/npm/w-threejs-vue@${pks.version}/dist/w-threejs-vue.umd.js"></script>`
|
|
19
|
+
|
|
20
|
+
//mkdirSync
|
|
21
|
+
if (!fs.existsSync(fdTar)) {
|
|
22
|
+
fs.mkdirSync(fdTar)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
//getFiles
|
|
26
|
+
let ltfs = getFiles(fdSrc)
|
|
27
|
+
|
|
28
|
+
_.each(ltfs, function(v) {
|
|
29
|
+
|
|
30
|
+
//fn
|
|
31
|
+
let fn = fdSrc + v
|
|
32
|
+
|
|
33
|
+
//c
|
|
34
|
+
let c = fs.readFileSync(fn, 'utf8')
|
|
35
|
+
|
|
36
|
+
//replace
|
|
37
|
+
let r = `<script src="../dist/w-threejs-vue.umd.js"></script>`
|
|
38
|
+
c = c.replace(r, cdn)
|
|
39
|
+
|
|
40
|
+
//write
|
|
41
|
+
//console.log(c)
|
|
42
|
+
fs.writeFileSync(fdTar + v, c, 'utf8')
|
|
43
|
+
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
}
|
|
47
|
+
main()
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import fs from 'fs'
|
|
2
|
+
import _ from 'lodash-es'
|
|
3
|
+
import w from 'wsemi'
|
|
4
|
+
import getFiles from 'w-package-tools/src/getFiles.mjs'
|
|
5
|
+
import cleanFolder from 'w-package-tools/src/cleanFolder.mjs'
|
|
6
|
+
import parseVueCode from 'w-package-tools/src/parseVueCode.mjs'
|
|
7
|
+
import extractHtml from 'w-package-tools/src/extractHtml.mjs'
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
let fdSrc = './src/'
|
|
11
|
+
let fdTestHtml = './test-html/'
|
|
12
|
+
let fdTestSrc = './test-action/'
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
function writeHtml(v) {
|
|
16
|
+
|
|
17
|
+
function getAppTmp() {
|
|
18
|
+
return v.tmp
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function procHtml(h) {
|
|
22
|
+
|
|
23
|
+
//change cmp name
|
|
24
|
+
h = w.replace(h, 'WThreejsVue', 'w-threejs-vue')
|
|
25
|
+
|
|
26
|
+
return h
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
//opt
|
|
30
|
+
let opt = {
|
|
31
|
+
title: `example for ${v.casename}`,
|
|
32
|
+
head: `
|
|
33
|
+
|
|
34
|
+
<!-- extractHtml已自動添加@babel/polyfill與vue -->
|
|
35
|
+
|
|
36
|
+
<!-- fontawesome -->
|
|
37
|
+
<link href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.4.2/css/all.min.css" rel="stylesheet">
|
|
38
|
+
|
|
39
|
+
<!-- mdi, 各組件使用mdi/js會於轉單頁時改為mdi icon, 故需引用mdi/css -->
|
|
40
|
+
<link href="https://cdn.jsdelivr.net/npm/@mdi/font@7.2.96/css/materialdesignicons.min.css" rel="stylesheet">
|
|
41
|
+
|
|
42
|
+
<!-- google, 各組件使用mdi/js故不需引用 -->
|
|
43
|
+
<link _href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900" rel="stylesheet">
|
|
44
|
+
<link _href="https://fonts.googleapis.com/css?family=Material+Icons" rel="stylesheet">
|
|
45
|
+
|
|
46
|
+
<!-- w-threejs-vue -->
|
|
47
|
+
<script src="../dist/w-threejs-vue.umd.js"></script>
|
|
48
|
+
|
|
49
|
+
<!-- lodash -->
|
|
50
|
+
<script src="https://cdn.jsdelivr.net/npm/lodash@latest/lodash.min.js"></script>
|
|
51
|
+
|
|
52
|
+
<!-- wsemi -->
|
|
53
|
+
<script src="https://cdn.jsdelivr.net/npm/wsemi@latest/dist/wsemi.umd.min.js"></script>
|
|
54
|
+
|
|
55
|
+
<!-- data -->
|
|
56
|
+
<script src="https://cdn.jsdelivr.net/npm/w-demores@1.0.23/res/data/dataRain.js"></script>
|
|
57
|
+
<script src="https://cdn.jsdelivr.net/npm/w-demores@1.0.23/res/data/dataRainClip.js"></script>
|
|
58
|
+
|
|
59
|
+
<!-- w-jsonview-tree -->
|
|
60
|
+
<script src="https://cdn.jsdelivr.net/npm/w-jsonview-tree@latest/dist/w-jsonview-tree.umd.js"></script>
|
|
61
|
+
<script>
|
|
62
|
+
let jv=window['w-jsonview-tree']
|
|
63
|
+
</script>
|
|
64
|
+
|
|
65
|
+
<style>
|
|
66
|
+
.option-label {
|
|
67
|
+
position:absolute;
|
|
68
|
+
left:10px;
|
|
69
|
+
top:-33px;
|
|
70
|
+
padding:4px 20px 7px 20px;
|
|
71
|
+
border-left:1px solid #ddd;
|
|
72
|
+
border-top:1px solid #ddd;
|
|
73
|
+
border-right:1px solid #ddd;
|
|
74
|
+
border-bottom:1px solid #f6f6f6;
|
|
75
|
+
border-top-left-radius:15px;
|
|
76
|
+
border-top-right-radius:15px;
|
|
77
|
+
background:#f6f6f6;
|
|
78
|
+
}
|
|
79
|
+
</style>
|
|
80
|
+
|
|
81
|
+
`,
|
|
82
|
+
appTag: `div`,
|
|
83
|
+
appStyle: `padding:0px 30px;`,
|
|
84
|
+
appTmp: getAppTmp(),
|
|
85
|
+
installVue: `Vue.component('w-threejs-vue', window['w-threejs-vue'])`,
|
|
86
|
+
newVue: ``,
|
|
87
|
+
data: v.data,
|
|
88
|
+
mounted: v.mounted,
|
|
89
|
+
computed: v.computed,
|
|
90
|
+
methods: v.methods,
|
|
91
|
+
action: v.action,
|
|
92
|
+
procHtml,
|
|
93
|
+
fpHtml: `${fdTestHtml}${v.fn}.html`,
|
|
94
|
+
fpAction: `${fdTestSrc}${v.fn}.action.json`,
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
//extractHtml
|
|
98
|
+
extractHtml(opt)
|
|
99
|
+
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
function extractApp(fn) {
|
|
104
|
+
|
|
105
|
+
//casename
|
|
106
|
+
let casename = fn.replace('.vue', '')
|
|
107
|
+
|
|
108
|
+
//read
|
|
109
|
+
let hh = fs.readFileSync(fdSrc + fn, 'utf8')
|
|
110
|
+
|
|
111
|
+
// //取代example與code
|
|
112
|
+
// hh = w.replace(hh, '{filename}', casename)
|
|
113
|
+
|
|
114
|
+
// //複寫回去, 因開發階段懶得手動改全部, 故得用程式改
|
|
115
|
+
// fs.writeFileSync(fdSrc + fn, hh, 'utf8')
|
|
116
|
+
|
|
117
|
+
//parseVueCode
|
|
118
|
+
let { tmp, mounted, data, computed, methods, action } = parseVueCode(hh)
|
|
119
|
+
|
|
120
|
+
//writeHtml
|
|
121
|
+
writeHtml({
|
|
122
|
+
fn: `ex-${casename}`,
|
|
123
|
+
casename,
|
|
124
|
+
tmp,
|
|
125
|
+
mounted,
|
|
126
|
+
data,
|
|
127
|
+
computed,
|
|
128
|
+
methods,
|
|
129
|
+
action,
|
|
130
|
+
})
|
|
131
|
+
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
function main() {
|
|
136
|
+
//由jsdoc產製之wsemi.html, 自動添加將example轉換成codepen線上編輯功能
|
|
137
|
+
|
|
138
|
+
//cleanFolder
|
|
139
|
+
cleanFolder(fdTestHtml)
|
|
140
|
+
//cleanFolder(fdTestSrc)
|
|
141
|
+
|
|
142
|
+
//getFiles
|
|
143
|
+
let ltfs = getFiles(fdSrc)
|
|
144
|
+
|
|
145
|
+
//filter
|
|
146
|
+
ltfs = _.filter(ltfs, function(v) {
|
|
147
|
+
return v.indexOf('App') >= 0
|
|
148
|
+
})
|
|
149
|
+
_.pull(ltfs, 'App.vue')
|
|
150
|
+
//console.log(ltfs)
|
|
151
|
+
|
|
152
|
+
//extractApp
|
|
153
|
+
_.each(ltfs, function(v) {
|
|
154
|
+
console.log('extracting: ' + fdSrc + v)
|
|
155
|
+
extractApp(v)
|
|
156
|
+
})
|
|
157
|
+
|
|
158
|
+
}
|
|
159
|
+
main()
|
package/vue.config.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
lintOnSave: false, //禁止eslint-loader於編譯時檢查語法
|
|
3
|
+
devServer: {
|
|
4
|
+
proxy: {
|
|
5
|
+
'/api': {
|
|
6
|
+
target: 'http://localhost:9000',
|
|
7
|
+
pathRewrite: {
|
|
8
|
+
'^/api': '/api'
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
'/swdoc': {
|
|
12
|
+
target: 'http://localhost:9000',
|
|
13
|
+
pathRewrite: {
|
|
14
|
+
'^/swdoc': '/swdoc'
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
//transpileDependencies: ['abc'],
|
|
20
|
+
//publicPath: process.env.NODE_ENV === 'production' ? '/abc/' : '/',
|
|
21
|
+
}
|