pearofducks / rollup-plugin-dev

development server for rollup with additional logging and options

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dist/index.cjs seems to have ?? in it causing error

RikuVan opened this issue · comments

Tried to upgrade to the latest version of this package (from 1) and ran into:

[!] SyntaxError: Unexpected token '?'
...
    const resolvedPort = await getPort__default["default"]({ host: (config.host ?? '127.0.0.0'), port: [config.port, ...getPort__default["default"].makeRange(8081, 9000)] });

I guess I just need a more recent node version...

yeah, I that did it. hadn't even realized that nullish coalescing thing had made into into node.

While this can be fixed by upgrading the node version, for projects that for some reason do not support a higher version of Node, the rollup-plugin-dev will not be available. So I think it is necessary to reopen this issue.

@ceynri - nullish coalescing landed in node 14, which is the oldest version of node still under maintenance. I have no interest in supporting versions of node that node itself isn't even supporting. :)

@ceynri - nullish coalescing landed in node 14, which is the oldest version of node still under maintenance. I have no interest in supporting versions of node that node itself isn't even supporting. :)

OK, thanks for your reply. 🙆