Using VSCode 1.15, and VSCode Chrome Debugger 3.1.7, my breakpoints are greyed out with with the error in the title "Breakpoint ignored because generated code not found". The .scripts command shows that the paths to the source maps are indeed correct.
Project Tree:
I run the application with the webpack-dev-server command.
webpack.config.js file:
const webpack = require('webpack')
const path = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')
module.exports = {
entry: './src/index.js',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist')
},
devtool: 'cheap-module-source-map',
devServer: {
contentBase: './dist',
port: 3000,
hot: true,
historyApiFallback: true
},
module: {
rules: [
{
test: /\.css$/,
use: ['style-loader', 'css-loader']
},
{
test: /\.(js|jsx)$/,
use: ['babel-loader', 'eslint-loader'],
exclude: /node_modules/
}
]
},
resolve: {
modules: [
path.join(__dirname, 'src'),
'node_modules'
],
extensions: ['.js', '.jsx']
},
plugins: [
new HtmlWebpackPlugin(),
new webpack.HotModuleReplacementPlugin()
]
}
My launch.json is as follows (I only use the launch option):
{
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome",
"url": "http://localhost:3000",
"webRoot": "${workspaceRoot}/src",
"sourceMaps": true,
"sourceMapPathOverrides": {
"webpack:///*": "*",
"webpack:///./*": "${webRoot}/*",
"webpack:///src/*": "${webRoot}/*",
"webpack:///./~/*": "${webRoot}/node_modules/*"
},
"trace": true
},
{
"type": "chrome",
"request": "attach",
"name": "Attach to Chrome",
"port": 9222,
"webRoot": "${workspaceRoot}"
}
]
}
.scripts command (I think most of it isn't interesting, the last 2 lines show that the mapping is correct as far as I understand):
› extensions::app
› http://localhost:3000/bundle.js
- webpack:///webpack/bootstrap d9f16bc355f23b8122c3 (webpack\bootstrap d9f16bc355f23b8122c3)
- webpack:///./node_modules/inherits/inherits_browser.js (node_modules\inherits\inherits_browser.js)
- webpack:///(webpack)/buildin/global.js ((webpack)\buildin\global.js)
- webpack:///./node_modules/process/browser.js (node_modules\process\browser.js)
- webpack:///./node_modules/debug/src/browser.js (node_modules\debug\src\browser.js)
- webpack:///./node_modules/sockjs-client/lib/event/emitter.js (node_modules\sockjs-client\lib\event\emitter.js)
- webpack:///./node_modules/sockjs-client/lib/utils/url.js (node_modules\sockjs-client\lib\utils\url.js)
- webpack:///./node_modules/json3/lib/json3.js (node_modules\json3\lib\json3.js)
- webpack:///./node_modules/sockjs-client/lib/utils/event.js (node_modules\sockjs-client\lib\utils\event.js)
- webpack:///./node_modules/sockjs-client/lib/utils/random.js (node_modules\sockjs-client\lib\utils\random.js)
- webpack:///./node_modules/sockjs-client/lib/transport/lib/ajax-based.js (node_modules\sockjs-client\lib\transport\lib\ajax-based.js)
- webpack:///./node_modules/sockjs-client/lib/transport/sender/xhr-local.js (node_modules\sockjs-client\lib\transport\sender\xhr-local.js)
- webpack:///./node_modules/sockjs-client/lib/utils/browser.js (node_modules\sockjs-client\lib\utils\browser.js)
- webpack:///./node_modules/sockjs-client/lib/utils/iframe.js (node_modules\sockjs-client\lib\utils\iframe.js)
- webpack:///./node_modules/sockjs-client/lib/transport/receiver/xhr.js (node_modules\sockjs-client\lib\transport\receiver\xhr.js)
- webpack:///./node_modules/sockjs-client/lib/transport/sender/xhr-cors.js (node_modules\sockjs-client\lib\transport\sender\xhr-cors.js)
- webpack:///./node_modules/sockjs-client/lib/transport/sender/xdr.js (node_modules\sockjs-client\lib\transport\sender\xdr.js)
- webpack:///./node_modules/sockjs-client/lib/transport/lib/iframe-wrap.js (node_modules\sockjs-client\lib\transport\lib\iframe-wrap.js)
- webpack:///./node_modules/sockjs-client/lib/utils/object.js (node_modules\sockjs-client\lib\utils\object.js)
- webpack:///./node_modules/sockjs-client/lib/event/event.js (node_modules\sockjs-client\lib\event\event.js)
- webpack:///(webpack)/hot/log.js ((webpack)\hot\log.js)
- webpack:///(webpack)/buildin/module.js ((webpack)\buildin\module.js)
- webpack:///./node_modules/url-parse/index.js (node_modules\url-parse\index.js)
- webpack:///./node_modules/sockjs-client/lib/event/eventtarget.js (node_modules\sockjs-client\lib\event\eventtarget.js)
- webpack:///./node_modules/sockjs-client/lib/transport/lib/sender-receiver.js (node_modules\sockjs-client\lib\transport\lib\sender-receiver.js)
- webpack:///./node_modules/sockjs-client/lib/transport/browser/abstract-xhr.js (node_modules\sockjs-client\lib\transport\browser\abstract-xhr.js)
- webpack:///./node_modules/sockjs-client/lib/transport/xdr-streaming.js (node_modules\sockjs-client\lib\transport\xdr-streaming.js)
- webpack:///./node_modules/sockjs-client/lib/transport/eventsource.js (node_modules\sockjs-client\lib\transport\eventsource.js)
- webpack:///./node_modules/sockjs-client/lib/transport/browser/eventsource.js (node_modules\sockjs-client\lib\transport\browser\eventsource.js)
- webpack:///./node_modules/sockjs-client/lib/transport/iframe.js (node_modules\sockjs-client\lib\transport\iframe.js)
- webpack:///./node_modules/sockjs-client/lib/version.js (node_modules\sockjs-client\lib\version.js)
- webpack:///./node_modules/sockjs-client/lib/transport/htmlfile.js (node_modules\sockjs-client\lib\transport\htmlfile.js)
- webpack:///./node_modules/sockjs-client/lib/transport/xhr-polling.js (node_modules\sockjs-client\lib\transport\xhr-polling.js)
- webpack:///./node_modules/sockjs-client/lib/location.js (node_modules\sockjs-client\lib\location.js)
- webpack:///./node_modules/sockjs-client/lib/info-iframe-receiver.js (node_modules\sockjs-client\lib\info-iframe-receiver.js)
- webpack:///./node_modules/sockjs-client/lib/info-ajax.js (node_modules\sockjs-client\lib\info-ajax.js)
- webpack:///./node_modules/html-entities/lib/html5-entities.js (node_modules\html-entities\lib\html5-entities.js)
- webpack:///(webpack)/hot/emitter.js ((webpack)\hot\emitter.js)
- webpack:///(webpack)-dev-server/client ((webpack)-dev-server\client)
- webpack:///./node_modules/url/url.js (node_modules\url\url.js)
- webpack:///./node_modules/punycode/punycode.js (node_modules\punycode\punycode.js)
- webpack:///./node_modules/url/util.js (node_modules\url\util.js)
- webpack:///./node_modules/querystring-es3/index.js (node_modules\querystring-es3\index.js)
- webpack:///./node_modules/querystring-es3/decode.js (node_modules\querystring-es3\decode.js)
- webpack:///./node_modules/querystring-es3/encode.js (node_modules\querystring-es3\encode.js)
- webpack:///./node_modules/strip-ansi/index.js (node_modules\strip-ansi\index.js)
- webpack:///./node_modules/ansi-regex/index.js (node_modules\ansi-regex\index.js)
- webpack:///./node_modules/loglevel/lib/loglevel.js (node_modules\loglevel\lib\loglevel.js)
- webpack:///(webpack)-dev-server/client/socket.js ((webpack)-dev-server\client\socket.js)
- webpack:///./node_modules/sockjs-client/lib/entry.js (node_modules\sockjs-client\lib\entry.js)
- webpack:///./node_modules/sockjs-client/lib/transport-list.js (node_modules\sockjs-client\lib\transport-list.js)
- webpack:///./node_modules/sockjs-client/lib/transport/websocket.js (node_modules\sockjs-client\lib\transport\websocket.js)
- webpack:///./node_modules/sockjs-client/lib/utils/browser-crypto.js (node_modules\sockjs-client\lib\utils\browser-crypto.js)
- webpack:///./node_modules/requires-port/index.js (node_modules\requires-port\index.js)
- webpack:///./node_modules/url-parse/node_modules/querystringify/index.js (node_modules\url-parse\node_modules\querystringify\index.js)
- webpack:///./node_modules/debug/src/debug.js (node_modules\debug\src\debug.js)
- webpack:///./node_modules/ms/index.js (node_modules\ms\index.js)
- webpack:///./node_modules/sockjs-client/lib/transport/browser/websocket.js (node_modules\sockjs-client\lib\transport\browser\websocket.js)
- webpack:///./node_modules/sockjs-client/lib/transport/xhr-streaming.js (node_modules\sockjs-client\lib\transport\xhr-streaming.js)
- webpack:///./node_modules/sockjs-client/lib/transport/lib/buffered-sender.js (node_modules\sockjs-client\lib\transport\lib\buffered-sender.js)
- webpack:///./node_modules/sockjs-client/lib/transport/lib/polling.js (node_modules\sockjs-client\lib\transport\lib\polling.js)
- webpack:///./node_modules/sockjs-client/lib/transport/receiver/eventsource.js (node_modules\sockjs-client\lib\transport\receiver\eventsource.js)
- webpack:///(webpack)/buildin/amd-options.js ((webpack)\buildin\amd-options.js)
- webpack:///./node_modules/sockjs-client/lib/transport/receiver/htmlfile.js (node_modules\sockjs-client\lib\transport\receiver\htmlfile.js)
- webpack:///./node_modules/sockjs-client/lib/transport/xdr-polling.js (node_modules\sockjs-client\lib\transport\xdr-polling.js)
- webpack:///./node_modules/sockjs-client/lib/transport/jsonp-polling.js (node_modules\sockjs-client\lib\transport\jsonp-polling.js)
- webpack:///./node_modules/sockjs-client/lib/transport/receiver/jsonp.js (node_modules\sockjs-client\lib\transport\receiver\jsonp.js)
- webpack:///./node_modules/sockjs-client/lib/transport/sender/jsonp.js (node_modules\sockjs-client\lib\transport\sender\jsonp.js)
- webpack:///./node_modules/sockjs-client/lib/main.js (node_modules\sockjs-client\lib\main.js)
- webpack:///./node_modules/sockjs-client/lib/shims.js (node_modules\sockjs-client\lib\shims.js)
- webpack:///./node_modules/sockjs-client/lib/utils/escape.js (node_modules\sockjs-client\lib\utils\escape.js)
- webpack:///./node_modules/sockjs-client/lib/utils/transport.js (node_modules\sockjs-client\lib\utils\transport.js)
- webpack:///./node_modules/sockjs-client/lib/utils/log.js (node_modules\sockjs-client\lib\utils\log.js)
- webpack:///./node_modules/sockjs-client/lib/event/close.js (node_modules\sockjs-client\lib\event\close.js)
- webpack:///./node_modules/sockjs-client/lib/event/trans-message.js (node_modules\sockjs-client\lib\event\trans-message.js)
- webpack:///./node_modules/sockjs-client/lib/info-receiver.js (node_modules\sockjs-client\lib\info-receiver.js)
- webpack:///./node_modules/sockjs-client/lib/transport/sender/xhr-fake.js (node_modules\sockjs-client\lib\transport\sender\xhr-fake.js)
- webpack:///./node_modules/sockjs-client/lib/info-iframe.js (node_modules\sockjs-client\lib\info-iframe.js)
- webpack:///./node_modules/sockjs-client/lib/iframe-bootstrap.js (node_modules\sockjs-client\lib\iframe-bootstrap.js)
- webpack:///./node_modules/sockjs-client/lib/facade.js (node_modules\sockjs-client\lib\facade.js)
- webpack:///(webpack)-dev-server/client/overlay.js ((webpack)-dev-server\client\overlay.js)
- webpack:///./node_modules/ansi-html/index.js (node_modules\ansi-html\index.js)
- webpack:///./node_modules/html-entities/index.js (node_modules\html-entities\index.js)
- webpack:///./node_modules/html-entities/lib/xml-entities.js (node_modules\html-entities\lib\xml-entities.js)
- webpack:///./node_modules/html-entities/lib/html4-entities.js (node_modules\html-entities\lib\html4-entities.js)
- webpack:///(webpack)/hot nonrecursive ^\.\/log$ ((webpack)\hot nonrecursive ^\log$)
- webpack:///./node_modules/events/events.js (node_modules\events\events.js)
- webpack:///(webpack)/hot/dev-server.js ((webpack)\hot\dev-server.js)
- webpack:///(webpack)/hot/log-apply-result.js ((webpack)\hot\log-apply-result.js)
- webpack:///src/index.js (src\index.js)
- webpack:///src/lmao.js (src\lmao.js)
This worked for me (chromeDevTools):
Map webpack://./ to / in your project workspace
Related
I'm trying to perform some basic JWT claim based routing leveraging OpenShift Service Mesh. OpenShift version is 4.6.23. RedHat OpenShift Service Mesh version is 2.1.1-0.
Below is the ServiceMeshControlPlane resource I use to setup ServiceMesh on the OCP cluster :
apiVersion: maistra.io/v2
kind: ServiceMeshControlPlane
metadata:
name: basic
namespace: istio-system
spec:
version: v2.0
tracing:
type: Jaeger
sampling: 10000
addons:
jaeger:
name: jaeger
install:
storage:
type: Memory
kiali:
enabled: true
name: kiali
grafana:
enabled: true
Basically, I tried to follow this Istio documentation page to test the JWT claim routing
Here is the structure of the JWT token I'm using :
{
"iss": "https://eu-de.appid.cloud.ibm.com/oauth/v4/6f631e4d-7ecc-4a1c-8cf8-ea2d0a5c32e6",
"exp": 1646244105,
"aud": [
"f7f1e8bf-72d0-4e7d-90ff-cb76a8079c46"
],
"sub": "99bb916e-8f99-4e0a-8b1f-72c2171448d1",
"email_verified": true,
"amr": [
"cloud_directory"
],
"iat": 1646240505,
"tenant": "6f631e4d-7ecc-4a1c-8cf8-ea2d0a5c32e6",
"scope": "openid appid_default appid_readuserattr appid_readprofile appid_writeuserattr appid_authenticated",
"roles": [
"teamA"
]
}
The RequestAuthentication definition :
apiVersion: security.istio.io/v1beta1
kind: RequestAuthentication
metadata:
name: jwt-auth
namespace: sample-mesh
spec:
jwtRules:
- issuer: "https://eu-de.appid.cloud.ibm.com/oauth/v4/6f631e4d-7ecc-4a1c-8cf8-ea2d0a5c32e6"
jwksUri: "https://eu-de.appid.cloud.ibm.com/oauth/v4/6f631e4d-7ecc-4a1c-8cf8-ea2d0a5c32e6/publickeys"
And the definition of the VirtualService that is supposed to handle the routing :
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: catalog
spec:
hosts:
- '*'
gateways:
- sample-mesh-gateway
http:
- match:
- headers:
"#request.auth.claims.roles":
exact: teamA
route:
- destination:
host: catalog
subset: version-v1
- route:
- destination:
host: catalog
subset: version-v2
I would then expect the trafic to be routed to the catalog v1 when the roles claim contains the value teamA. But in practice, I observe that the trafic is always routed to catalog v2 even if the token has the required value in the claim.
Is there anything I missed in the configuration ?
Thanks :-)
I have a Traefik service with the following configuration:
version: "3.9"
services:
reverse-proxy:
image: traefik:v2.3.4
networks:
common:
ports:
- target: 80
published: 80
mode: host
- target: 443
published: 443
mode: host
command:
- "--providers.docker.endpoint=unix:///var/run/docker.sock"
- "--providers.docker.swarmMode=true"
- "--providers.docker.exposedbydefault=false"
- "--providers.docker.network=common"
- "--entrypoints.web.address=:80"
# - "--entrypoints.websecure.address=:443"
- "--global.sendAnonymousUsage=true"
# Set a debug level custom log file
- "--log.level=DEBUG"
- "--log.format=json"
- "--log.filePath=/var/log/traefik.log"
- "--accessLog.filePath=/var/log/access.log"
# Enable the Traefik dashboard
- "--api.dashboard=true"
# - "traefik.constraint-label=common" TODO
deploy:
placement:
constraints:
- node.role == manager
labels:
# Expose the Traefik dashboard
- "traefik.enable=true"
- "traefik.http.routers.dashboard.service=api#internal"
- "traefik.http.services.traefik.loadbalancer.server.port=888" # A port number required by Docker Swarm but not being used in fact
- "traefik.http.routers.dashboard.rule=Host(`traefik.learnintouch.com`)"
- "traefik.http.routers.traefik.entrypoints=web"
# - "traefik.http.routers.traefik.entrypoints=websecure"
# Basic HTTP authentication to secure the dashboard access
- "traefik.http.routers.traefik.middlewares=traefik-auth"
- "traefik.http.middlewares.traefik-auth.basicauth.users=stephane:$$apr1$$m72sBfSg$$7.NRvy75AZXAMtH3C2YTz/"
volumes:
# So that Traefik can listen to the Docker events
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "~/dev/docker/projects/common/volumes/logs/traefik.service.log:/var/log/traefik.log"
- "~/dev/docker/projects/common/volumes/logs/traefik.access.log:/var/log/access.log"
Then I watch the log with the command:
stephane#stephane-pc:~$ tail -f dev/docker/projects/common/volumes/logs/traefik.service.log
{"level":"info","msg":"I have to go...","time":"2021-07-03T10:18:10Z"}
{"level":"info","msg":"Stopping server gracefully","time":"2021-07-03T10:18:10Z"}
{"entryPointName":"web","level":"debug","msg":"Waiting 10s seconds before killing connections.","time":"2021-07-03T10:18:10Z"}
{"entryPointName":"web","level":"error","msg":"accept tcp [::]:80: use of closed network connection","time":"2021-07-03T10:18:10Z"}
I expected the log to be formatted in JSON with indentation.
So I copy-pasted the non indented JSON output in an online JSON formatter but it only indented part of it, making the whole thing useless.
Your problem is that Traefik does not output a single JSON document, but one JSON document per line. You could beautify all documents using xargs and jq:
tail -f dev/docker/projects/common/volumes/logs/traefik.service.log | xargs -n 1 -d "\n" -- bash -c 'echo "$1" | jq' _
In your example, this will result in this output (even with syntax highlighting if your terminal supports that):
{
"level": "info",
"msg": "I have to go...",
"time": "2021-07-03T10:18:10Z"
}
{
"level": "info",
"msg": "Stopping server gracefully",
"time": "2021-07-03T10:18:10Z"
}
{
"entryPointName": "web",
"level": "debug",
"msg": "Waiting 10s seconds before killing connections.",
"time": "2021-07-03T10:18:10Z"
}
{
"entryPointName": "web",
"level": "error",
"msg": "accept tcp [::]:80: use of closed network connection",
"time": "2021-07-03T10:18:10Z"
}
I have behat 3.5 up and running fine on windows 10. Now I wish to publish test results in html format. I installed this plugin https://github.com/dutchiexl/BehatHtmlFormatterPlugin
But how do I run behat tests utilizing this plugin? If I type "behat" I only see test steps in text format on the console. If I type "behat --format html --out test.feature.html --config behat.yml" I get an html output that looks "ugly".
My composer.json:
{
"require": {
"behat/behat": "~3.0",
"behat/mink": "~1.7#dev",
"behat/mink-goutte-driver": "1.2.1",
"behat/mink-selenium2-driver": "~1.3.1" ,
"behat/mink-extension": "*"
},
"config": {
"bin-dir": "bin/"
},
"require-dev": {
"emuse/behat-html-formatter": "^0.2.0"
}
}
My behat.yml:
default:
extensions:
Behat\MinkExtension:
default_session: goutte
goutte: ~
selenium2:
wd_host: "http://127.0.0.1:4444/wd/hub"
capabilities: { "browserName": "firefox", "browser": "firefox", "version": "", "platform": "WINDOWS" }
browser_name: firefox
emuse\BehatHTMLFormatter\BehatHTMLFormatterExtension:
name: html
renderer: Twig,Behat2
file_name: index
print_args: true
print_outp: true
loop_break: true
suites:
default:
contexts:
- emuse\BehatHTMLFormatter\Context\ScreenshotContext:
screenshotDir: build/html/behat/assets/screenshots
- FeatureContext
formatters:
html:
output_path: %paths.base%/build/html/behat
I found the details to make this work at https://packagist.org/packages/emuse/behat-html-formatter - I am using behat 3.6.1
After installing the html formatter with composer: composer require --dev emuse/behat-html-formatter I made my behat.html file look like this:
default:
suites:
default:
contexts:
- FeatureContext
- Drupal\DrupalExtension\Context\DrupalContext
- Drupal\DrupalExtension\Context\MinkContext
- Drupal\DrupalExtension\Context\MessageContext
- Drupal\DrupalExtension\Context\DrushContext
- emuse\BehatHTMLFormatter\Context\ScreenshotContext:
screenshotDir: report/html/behat/assets/screenshots
formatters:
html:
output_path: report/html/behat
extensions:
Drupal\MinkExtension:
goutte: ~
selenium2: ~
base_url: http://tea.ddev.site
Drupal\DrupalExtension:
blackbox: ~
emuse\BehatHTMLFormatter\BehatHTMLFormatterExtension:
name: html
renderer: Twig,Behat2
file_name: index
print_args: true
print_outp: true
loop_break: true
Now when I run the behat tests, the output goes to behat/report/html/behat/index.html
I don't need to specify the output as html, it automatically does that.
I would like to apply PWA in nuxt(#2.3.4) web application.
The operating system is OSX latest.
So I have installed #nuxtjs/pwa and add some config to nuxt.config.js.
These are what I have added
module.exports = {
...
modules: [
['#nuxtjs/pwa', {icon : false}]
],
workbox : {
dev: true,
debug: true
},
manifest : {
viewport: 'width=device-width, initial-scale=1',
theme_color: '#3B8070'
},
...
}
And build with NODE_ENV=production and start.
I am able to find sw.js in localhost:9000, but it is not available with
local.jy.net:9000.
I was expecting the same result since I register that hostname on my hosts file.
Here is what I have in /private/etc/hosts.
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
127.0.0.1 Juneui-MacBook-Pro.local
127.0.0.1 local.jy.net aad901eb546340cc9a69b0b030b124fc.jy.net
How could I make #nuxtjs/pwa refers system hosts variables?
If you need more information, add reply then I will provide as possible as I can. Thanks.
The #nuxtjs/pwa package is looking for the build.publicPath option: https://github.com/nuxt-community/pwa-module/blob/9f27d5cdae0e0341d6d4b4f6814f91db6eab1432/packages/manifest/index.js#L24
Adding this option to your nuxt.config.js should do the trick:
module.exports = {
...
modules: [
['#nuxtjs/pwa', {icon : false}]
],
workbox : {
dev: true,
debug: true
},
manifest : {
viewport: 'width=device-width, initial-scale=1',
theme_color: '#3B8070'
},
build: {
publicPath: '//local.jy.net:9000/pwa/',
}
...
}
You can find more information about the publicPath property here: https://nuxtjs.org/api/configuration-build#publicpath
So I'm trying to use LiteServer in my project, but I can't get it to change the default watch of index.html, my current file is index1.html. I specified app2.js as the entry point during npm init, so I was able to change the JS default, but not for HTML.
> 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
I know the doc mentions the use of a bs-config.json file, but I couldn't get any reference which has the syntax for this.
Would appreciate the help!
UPDATE - I currently have this in the bs-config.json file, but no use -
{
"files": ["style.css", "app2.js", "index1.html"]
}
lite-server is based on BrowserSync. bs-config.js is browsersync's config file. The config options are documented here:
https://browsersync.io/docs/options
For example, to set your default indx to be index1.html, instead of setting it in your routes, the bs-config.json could contain:
{
"server": {
"baseDir": "src",
"index": "/index1.html",
"routes": {
"/node_modules": "node_modules"
}
}
}