krisk / Fuse

Lightweight fuzzy-search, in JavaScript
https://fusejs.io/
Apache License 2.0
18.35k stars 772 forks source link

Add missing babel object spread plugin for IE11 #381

Closed guillaumewuip closed 4 years ago

guillaumewuip commented 4 years ago

Fixes #374

krisk commented 4 years ago

Did you also mean to make a transpilation change to configs.js? The idea would be to turn on transpilation for the esm build, this will enable both babel and buble to do their thing.

esm: {
  entry: resolve('src/index.js'),
  dest: resolve(`dist/${FILENAME}.esm.js`),
  format: 'es',
  env: 'development',
  transpile: false // <-- this is the offending line
}

The change, as is, after building, doesn't actually change the build file 😄Perhaps I am missing the intention of this PR then?

guillaumewuip commented 4 years ago

Oh yes you're right, I forgot to add this to the PR. It's important for the ESM build to be transpiled to ES5, except for import/export that should be ES6 for webpack or other build tool to tree shake properly. Sorry !

Do you want me to make another PR ?

krisk commented 4 years ago

Yes pls

guillaumewuip commented 4 years ago

Done in #383