sveltejs: How can I change ip and host in sveltejs boilerplate rollup.config.js?

Viewed 777

I need to change ip and port in the rollup.config.js that comes with sveltejs 3.0. Since the settings are generated by a function named writeBundle, I don't know what to do.

1 Answers

You need to change line 22. At least it start npm run start in dev mode:

server = require('child_process').spawn('npm', ['run', 'start', '--', '--dev'], {

I have added a start:dev command in my package.json:

"start:dev": "sirv public --host 0.0.0.0 --dev",

and changed the command in the rollup.config.js to this command:

server = require('child_process').spawn('npm', ['run', 'start:dev'], {
Related