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
TBH I can't find the exact code for [email protected] published to npm as there are no tags in this repo and it doesn't look like it's in the history, but whatever is published to npm does not optimise any files because it expects a file to be both .js and .mjs which obviously isn't possible:
With this in mind, what is the status of esx, are you using it in production via some other means (babel plugin)? Also, is there any plan to support the legacy context API by any chance?
Really interesting project BTW!
Full npm module here:
'use strict'constconvert=require('to-esx')constModule=require('module')const{ extname }=require('path')const{ _compile }=Module.prototyperequire('esx')//load esx into the cacheconstesx=require.resolve('esx')constpreloaded=require.main===undefinedfunctionunsupported(filename){constext=extname(filename)returnext!=='.js'||ext!=='.mjs'}functioninstall(opts={}){const{ exclude =()=>false}=optsModule.prototype._compile=function(content,filename){if(filename===esx||exclude(filename)||unsupported(filename)){return_compile.call(this,content,filename)}try{constconverted=convert(content)return_compile.call(this,converted,filename)}catch(e){console.log(e,filename,content)}returncontent}returnmodule.exports}functionrestore(){Module.prototype._compile=_compilereturnmodule.exports}if(preloaded)install()module.exports={ install, restore }
The text was updated successfully, but these errors were encountered:
TBH I can't find the exact code for [email protected] published to npm as there are no tags in this repo and it doesn't look like it's in the history, but whatever is published to npm does not optimise any files because it expects a file to be both
.js
and.mjs
which obviously isn't possible:I expect it should be:
With this in mind, what is the status of esx, are you using it in production via some other means (babel plugin)? Also, is there any plan to support the legacy context API by any chance?
Really interesting project BTW!
Full npm module here:
The text was updated successfully, but these errors were encountered: