pearofducks / rollup-plugin-dev

development server for rollup with additional logging and options
MIT License
61 stars 9 forks source link

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

Closed RikuVan closed 2 years ago

RikuVan commented 2 years ago

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)] });
RikuVan commented 2 years ago

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

RikuVan commented 2 years ago

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

ceynri commented 2 years ago

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.

pearofducks commented 2 years ago

@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 commented 2 years ago

@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. 🙆