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'm using expose-loader to expose some ES6 modules, which are currently using export default {...}, however instead of getting the resource at my exposed variable, it's at module.default. Here's my require:
require("expose-loader?Store!./store/index.js");
And here's my export:
exportdefaultnewVuex.Store({
...
})
My module is now exposed at Store.default.
Is this just a side effect of ES6 modules or is there a way to expose the default directly on the variable?
The text was updated successfully, but these errors were encountered:
No the loader still uses CJS internally so your exposed file becomes a harmony export atm. We could/should update this to use ESM instead, but needs triage
michael-ciniawsky
changed the title
Default export available as module.default in ES6 modules
[Refactor] Support exposing ESM without harmony export
Nov 16, 2017
I'm using expose-loader to expose some ES6 modules, which are currently using
export default {...}
, however instead of getting the resource at my exposed variable, it's atmodule.default
. Here's my require:And here's my export:
My module is now exposed at
Store.default
.Is this just a side effect of ES6 modules or is there a way to expose the default directly on the variable?
The text was updated successfully, but these errors were encountered: