bublejs / buble

https://buble.surge.sh
MIT License
871 stars 64 forks source link

Treat all dependencies as externals #161

Closed onigoetz closed 6 years ago

onigoetz commented 6 years ago

As explained in https://github.com/Rich-Harris/buble/issues/159#issuecomment-430633708 rollup doesn't like half-internalized externals. This change will treat all dependencies as externals and thus won't try to convert their imports.

Fixes #158 Fixes #159 Replaces #160

onigoetz commented 6 years ago

The tests fail because acorn-jsx fails on node 4, but it seems that their own tests also fail on node 4 : https://travis-ci.org/RReverser/acorn-jsx should it still be supported ?

alansouzati commented 6 years ago

I've tested this and this still does not fix the problem for me.

I'm getting:

Uncaught TypeError: acorn_jsx__WEBPACK_IMPORTED_MODULE_3___default(...) is not a function
onigoetz commented 6 years ago

@alansouzati it seems the issue you're having is with acorn-jsx now. What version of webpack do you have ?

adrianheine commented 6 years ago

@alansouzati Could you try #162, too?

alansouzati commented 6 years ago

I'm using webpack 4.21.0

elevatebart commented 6 years ago

It seems that acorn-jsx@5.0.0 is publishing code that is incompatible with node 4. This code needs to be transpiled as node 4 does not understand const for instance.

Should I have a go?

adrianheine commented 6 years ago

I plan to support nodejs 4 for a while, since it is in Debian stable. RReverser/acorn-jsx#91 would fix the issue for acorn-jsx, but regexpu-core is also not compatible with nodejs 4.

elevatebart commented 6 years ago

This build of regexpu-core seems to test positively on node 4

adrianheine commented 6 years ago

@alansouzati Could you try to give me a minimal repro case for your issue? I wrote a minimal test for #164 using webpack and it works.

adrianheine commented 6 years ago

Merged as 9d6aa44f6e3e39977d9380a2ca028fd25a6668f3 as part of #164.

onigoetz commented 6 years ago

Thanks for the release, will try it tomorrow :)

Obtenez Outlook pour iOShttps://aka.ms/o0ukef


From: Adrian Heine né Lang notifications@github.com Sent: Tuesday, October 23, 2018 7:43:28 PM To: Rich-Harris/buble Cc: Stéphane Goetz; Author Subject: Re: [Rich-Harris/buble] Treat all dependencies as externals (#161)

Merged as 9d6aa44https://github.com/Rich-Harris/buble/commit/9d6aa44f6e3e39977d9380a2ca028fd25a6668f3 as part of #164https://github.com/Rich-Harris/buble/pull/164.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Rich-Harris/buble/pull/161#issuecomment-432347058, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAS5WlGLpAgIUMz4Im17cR-3zmYws0QYks5un1VAgaJpZM4Xj9Xu.