rollup-plugin-livereload
rollup-plugin-livereload copied to clipboard
Livereload error on https
My stack right now svelte and tailwindcss.
This is my rollup.config.js:
import { spawn } from 'child_process';
import svelte from 'rollup-plugin-svelte';
import commonjs from '@rollup/plugin-commonjs';
import terser from '@rollup/plugin-terser';
import resolve from '@rollup/plugin-node-resolve';
import livereload from 'rollup-plugin-livereload';
import css from 'rollup-plugin-css-only';
import sveltePreprocess from 'svelte-preprocess';
import typescript from '@rollup/plugin-typescript';
const production = !process.env.ROLLUP_WATCH;
function serve() {
let server;
function toExit() {
if (server) server.kill(0);
}
return {
writeBundle() {
if (server) return;
server = spawn('npm', ['run', 'start', '--', '--dev'], {
stdio: ['ignore', 'inherit', 'inherit'],
shell: true
});
process.on('SIGTERM', toExit);
process.on('exit', toExit);
}
};
}
export default {
input: 'src/main.ts',
output: {
sourcemap: true,
format: 'iife',
name: 'app',
file: '../../apps/firstarticleinspection/bundle.js'
},
plugins: [
svelte({
preprocess: sveltePreprocess({
sourceMap: !production,
postcss: {
config: {
path: './postcss.config.cjs',
},
extensions: ['.css'],
minimize: true,
inject: {
insertAt: 'top',
},
},
}),
compilerOptions: {
// enable run-time checks when not in production
dev: !production
}
}),
css({ output: 'bundle.css' }),
resolve({
browser: true,
dedupe: ['svelte'],
exportConditions: ['svelte']
}),
commonjs(),
typescript({
sourceMap: true,
inlineSources: !production
}),
!production && serve(),
!production && livereload({watch: '../apps/firstarticleinspection', https: false, delay: 200}),
production && terser()
],
watch: {
clearScreen: false
}
};
The issue is that when I run my web app, I get this error message:
GET https://localhost:35729/livereload.js?snipver=1 net::ERR_SSL_VERSION_OR_CIPHER_MISMATCH
Any ideas what I can do?
@justin-buenaventura could you put this into a dedicated repository as a Minimal, Reproducible Example? With so many plugins and code it's hard to tell where things are going wrong.