jsqrt / bun-bundler

Bun-Bundler: Modern, Simple, and Ultra-Fast HTML Bundler. Bun | Pug/HTML | SCSS/CSS | JS | SVG Sprite | Image optimizations
MIT License
4 stars 0 forks source link

Override browserSync config #1

Closed karneaud closed 1 month ago

karneaud commented 2 months ago

Any particular reason you are setting the configurations for browsersync in the way you do? I have my own configuration that I would like to use as the ui ports seem to have some side effects when I use the defaults

jsDist: `${dist}/js/`,
        onStart: () => {
            server.startServer({
                open: false,
                host: '0.0.0.0',
                codeSync: true,
                debug: debugMode,
                port: 3000,
                root: dist,
                ui: {
                    port: 3001,
                    weinre: {
                        port: 3002
                    }
                }
            });
        },
jsqrt commented 2 months ago

Any particular reason you are setting the configurations for browsersync in the way you do? I have my own configuration that I would like to use as the ui ports seem to have some side effects when I use the defaults

jsDist: `${dist}/js/`,
      onStart: () => {
          server.startServer({
              open: false,
                host: '0.0.0.0',
                codeSync: true,
              debug: debugMode,
              port: 3000,
              root: dist,
                ui: {
                    port: 3001,
                    weinre: {
                        port: 3002
                    }
                }
          });
      },

Thanks for pointing that out. You`re absolutely right, need to add that functionality 👍. I'm currently working through the documentation and usage examples to ensure a smoother dev experience. However, this is something I’m doing in my free time :) Obviously, you can help with it, and I'd really appreciate it.

jsqrt commented 1 month ago

fixed! try this:

server.startServer({
    open: true, // if needed
    debug: debugMode,
    root: dist,
    overrides: {
        host: '0.0.0.0',
        codeSync: true,
        debug: debugMode,
        port: 3000,
        root: dist,
        ui: {
            port: 3001,
            weinre: {
                port: 3002,
            },
        },
    },
});