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
When building for browsers, the default behavior of Webpack when resolving package's main module is to look in package.json for these fields (in order):
browser: Browser-targeted module. Good to differentiate from Node targets.
module: Module using ESM syntax (discussion is in progress and stuff might change with Node 14)
FuzzySearch correctly points to a valid module, but that file not only contains ESM syntax, but lots of ES2015+ stuff.
Webpack handles ESM, but the other ES2015+ stuff passes straight through and IE does what it does best.
I suggest you to either:
Replace current module (or create a browser), with a ES5 module, keeping ESM declarations
Explain that the module webpack is going to use is not IE-ready and will require adjustments to support it. Here are a couple of possible fixes for their build config:
Force babel-loader to run in fuzzy-search directory;
When building for browsers, the default behavior of Webpack when resolving package's main module is to look in
package.json
for these fields (in order):browser
: Browser-targeted module. Good to differentiate from Node targets.module
: Module using ESM syntax (discussion is in progress and stuff might change with Node 14)main
: Module using good-old CommonJSAlso, it's very common to make
babel-loader
skipnode_modules
dir, to save some build time. Their own example instructs that.FuzzySearch
correctly points to a validmodule
, but that file not only contains ESM syntax, but lots of ES2015+ stuff.Webpack handles ESM, but the other ES2015+ stuff passes straight through and IE does what it does best.
I suggest you to either:
module
(or create abrowser
), with a ES5 module, keeping ESM declarationsForce
babel-loader
to run infuzzy-search
directory;Create an alias, replacing
fuzzy-search
with a direct path todist/FuzzySearch.js
:The text was updated successfully, but these errors were encountered: