digitalbazaar / credential-handler-demo

Credential Handler API demo
BSD 3-Clause "New" or "Revised" License
6 stars 1 forks source link

webpack with `localForage` module #1

Open mattcollier opened 7 years ago

mattcollier commented 7 years ago

There is a module localForage that is installed as part of angular-credential-mediator-site. This module has a .bablerc file which calls for a add-module-exports plugin.

When attempting to optimize the angular-credential-mediator-site module, an error is thrown about an unknown plugin add-module-exports. Here is the full error

I'm going to try adding that babel plugin to the top-level module to see if it helps.

mattcollier commented 7 years ago

Update: i have forked localforage and renamed the .babelrc file there which gets us past the aforementioned error.

Which brings us to an uglifyjs error

Unexpected token: punc ()

The uglifyjs error can be avoided by specifying the --webpack-uglify false option during bedrock optimizaiton.

The uglifyjs error is well know and is apparently caused by uglifyjs encountering some ES6 code that it does not understand.