Search This Blog

Set up http proxy for Svelte web app using rollup-plugin-dev

  • Install rollup-plugin-dev:
    npm install -D rollup-plugin-dev
  • Modify rollup.config.js:
    import dev from 'rollup-plugin-dev';
    ... ...
    export default {
    	... ...
        plugins: [
        	... ...
            !production && dev({
            	host: 'localhost',
    			port: 5000,
    			dirs: ['public'],
    			proxy: [{ from: '/__mflux_svc__', to: 'http://localhost:8086' }]
    		}),
        
        // !production && serve(),
        ... ...
        ]
    }
    	

see also

No comments:

Post a Comment