lite-server가 기본 색인을 덮어 쓰려는 시도를 무시하고있는 것처럼 보입니다.lite-server가 bs-config.js에서 "server.index"무시를 인식하도록하는 올바른 방법입니까?
내가 BS-config.json 있습니다
{
"server": {
"baseDir": "src",
"index": "/index.3.html",
"routes": {
"/node_modules": "node_modules"
}
}
}
나는 라이트 - 서버 버전 2.3.0을 사용하고,이 같은 : 위의 콘솔 로그 출력에서
> lite-server -c=bs-config.json
browser-sync config **
{ injectChanges: false,
files: [ './**/*.{html,htm,css,js}' ],
watchOptions: { ignored: 'node_modules' },
server:
{ baseDir: 'src',
middleware: [ [Function], [Function] ],
directory: true,
index: '/index.3.html',
routes: { '/node_modules': 'node_modules'
}
}
}
를, 그것은 인식 bs-config.json index의 기본값은 "index.3.html"입니다. 그러나 브라우저에서 "GET http://localhost"을 요청하면 콘솔은 index.3.html 대신 index.html을 제공하려고 시도하고 있음을 보여줍니다. 나는 또한 BS-config.js을 공급 시도
[Browsersync] Serving files from: src
[Browsersync] Watching files...
17.09.04 22:35:51 404 GET /index.html
:
"use strict";
module.exports = {
"server": {
"baseDir": "src",
index: "i/index.3.html",
"directory":true,
"routes": {
"/node_modules": "node_modules"
}
// middleware,: {
// // overrides the second middleware default with new settings
// 1: require('connect-history-api-fallback')({index: '/index.3.html', verbose: true})
// }
}
}
와 함께 라이트 서버를 실행 :
> lite-server -c=bs-config.js
하지만 동작은 동일합니다.
질문 : bs-config의 server.index를 라이트 서버로 대체하려면 어떻게합니까?