0
所以我試圖在我的項目中使用LiteServer,但我無法得到它來更改默認手錶index.html
,我當前的文件是index1.html
。我指定app2.js
作爲npm init
期間的入口點,所以我能夠更改JS默認值,但不能用於HTML。如何更改LiteServer中的默認文件觀看選項
> lite-server
Did not detect a `bs-config.json` or `bs-config.js` override file. Using lite-server defaults...
** browser-sync config **
{ injectChanges: false,
files: [ './**/*.{html,htm,css,js}' ],
watchOptions: { ignored: 'node_modules' },
server: { baseDir: './', middleware: [ [Function], [Function] ] } }
[BS] Access URLs:
--------------------------------------
Local: http://localhost:3000
External: http://10.40.244.189:3000
--------------------------------------
UI: http://localhost:3001
UI External: http://10.40.244.189:3001
--------------------------------------
[BS] Serving files from: ./
[BS] Watching files...
16.12.21 18:43:32 200 GET /index.html
16.12.21 18:43:32 200 GET /style.css
16.12.21 18:43:33 200 GET /app2.js
16.12.21 18:43:34 404 GET /favicon.ico
我知道doc提到使用bs-config.json
文件,但我不能讓這對於這個語法的任何引用。
將不勝感激的幫助!
更新 - 我現在有這樣的bs-config.json
文件,但沒有用 -
{
"files": ["style.css", "app2.js", "index1.html"]
}
沒關係,我只是在路線中添加了'/ index1.html',並且它工作正常。 –