lite-server, похоже, игнорирует мою попытку переопределить индекс по умолчанию.
У меня есть bs-config.json:
{
"server": {
"baseDir": "src",
"index": "/index.3.html",
"routes": {
"/node_modules": "node_modules"
}
}
}
Я использую lite-server версии 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.3.html», однако, когда браузер запрашивает «GET http://localhost", консоль показывает, что он пытается обслуживать index.html вместо index.3.html.
[Browsersync] Serving files from: src
[Browsersync] Watching files...
17.09.04 22:35:51 404 GET /index.html
Я также попытался предоставить bs-config.js:
"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-сервера с:
> lite-server -c=bs-config.js
но поведение такое же.
Вопрос: как переопределить server.index bs-config для lite-server?