Esm: 3.0.37: Oneline re-export throws a syntax error

Created on 25 May 2018  路  1Comment  路  Source: standard-things/esm

Hi.

I've tried hard but couldn't narrow this down and extract into a small reproducible example, probably the issue requires some conditions and environment, so here is a live project: https://github.com/deepsweet/start

yarn
yarn list --pattern esm
# 3.0.36
yarn start

Expected result:

One of the following task names is required:
...

Then:

yarn upgrade [email protected]
yarn start
SyntaxError: Missing export 'istanbulInstrument' in ES module: /.../@start/packages/plugin-lib-istanbul/src/index.ts

But if I change packages/plugin-lib-istanbul/src/index.ts from:

export { default as istanbulInstrument } from './instrument'
export { default as istanbulReport } from './report'
export { default as istanbulThresholds } from './thresholds'

To:

import istanbulInstrument from './instrument'
import istanbulReport from './report'
import istanbulThresholds from './thresholds'

export { istanbulInstrument }
export { istanbulReport }
export { istanbulThresholds }

Then it works again:

yarn start
One of the following task names is required:
...

馃

bug

Most helpful comment

Thanks @deepsweet!

I know the general area that's causing this issue. I'll dig into it today.

\cc @StreetStrider: This is likely related.

Update:

v3.0.38 is released :tada:

>All comments

Thanks @deepsweet!

I know the general area that's causing this issue. I'll dig into it today.

\cc @StreetStrider: This is likely related.

Update:

v3.0.38 is released :tada:

Was this page helpful?
0 / 5 - 0 ratings