dojo / webpack-contrib

Plugins and loaders for webpack used with Dojo
Other
4 stars 19 forks source link

Acorn upgrade causing dynamic import syntax error in async.js #339

Closed KaneFreeman closed 2 years ago

KaneFreeman commented 2 years ago

Bug

SyntaxError: Unexpected token (8:17) occurs in bootstrap-plugin/async.js when building Dojo Site against version 8. Acorn version 6.2 added support for dynamic imports which is conflicting syntax wise with the dynamic import plugin used in static-build-loader/loader.js.

Acorn was updated from 6.1.1 to 7.4.1 in #319, dynamic imports were introduced in 6.2.0.

Code

https://github.com/dojo/site/tree/feature/version-8

agubler commented 2 years ago

Hey @KaneFreeman this was back ported so it would be broken in version 7 if this is cause of the error?

KaneFreeman commented 2 years ago

@agubler I would assume so, but that change to 7 was never pushed to npm.

agubler commented 2 years ago

@KaneFreeman are you sure? it looks like it was released on version 7.0.7 which is the dependency of the of the most recent release of cli-build-app (7.0.5)

KaneFreeman commented 2 years ago

@agubler yes, you are correct. it looks like dojo site is still on cli-build-app version 7.0.4. Thus why it can still build in its current state.

KaneFreeman commented 2 years ago

Indeed, updating to 7.0.5 causes the same error to appear.