You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been having problems getting a particular build to work, and I've reduced it down to the fact that I'm including a module from npm that contains an import statement.
Here's my reduced setup:
entry: ./index.js
local module: ./a.js
node module: ./node_modules/a/index.js
In the above setup, the code in both the local module and the node module is identical:
exportdefault{foo: 'bar'};
Splittlable works if my entry file looks like this (referencing the local module):
importafrom'./a';console.log(a);
But it doesn't work if my entry file looks like this (referencing the node module):
Yeah, this is a known issue (see readme for common js limitations), but it
will be fixed once an open PR merges in upstream closure compiler.
Let's keep this open to track.
On Dec 31, 2016 6:34 PM, "Philip Walton" ***@***.***> wrote:
I should mention that if I rewrite the modules to use CommonJS syntax,
both variations work. For example:
In ./a and ./node_modules/a/index.js:
module.exports = {
foo: 'bar'
};
In ./index:
const a = require('a');
console.log(a);
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#45 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAFeT_UGe8xcgt4DPsUELwPhzbM3XFlTks5rNxC-gaJpZM4LYpok>
.
I've been having problems getting a particular build to work, and I've reduced it down to the fact that I'm including a module from npm that contains an
import
statement.Here's my reduced setup:
./index.js
./a.js
./node_modules/a/index.js
In the above setup, the code in both the local module and the node module is identical:
Splittlable works if my entry file looks like this (referencing the local module):
But it doesn't work if my entry file looks like this (referencing the node module):
Here's terminal output:
The text was updated successfully, but these errors were encountered: