プロジェクトでLiteServerを使用しようとしていますが、デフォルトの時計をindex.html
に変更できません。現在のファイルはindex1.html
です。私はnpm init
の間にエントリポイントとしてapp2.js
を指定したので、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
ファイルの使用に言及したが、私は、このための構文を持つすべての参照を取得できませんでした。
助けていただければ幸いです!
UPDATE - 私は現在bs-config.json
ファイルでこれを持っていますが、何の使用 -
{
"files": ["style.css", "app2.js", "index1.html"]
}
気にしないで、私は '/ index1.html'をルートに追加しただけです。 –