Adam42 / pull-tabs

Browser extension to manage tabs either in bulk or per-tab
https://adam42.github.io/pull-tabs/
Other
7 stars 0 forks source link

Uncaught TypeError: Constructor WeakMap requires 'new' #36

Closed Adam42 closed 6 years ago

Adam42 commented 6 years ago

running mix.babel on the browser-polyfill AND npm run production results in a broken chrome build. Using just mix.combine results in mix failing.

This is due to babel not supporting extending native types this way: https://github.com/babel/babel/issues/6453

Running npm run watch/dev works but results in un-minified files.

Adam42 commented 6 years ago

Really this is just a warning that the file wasn't minified. Probably not a huge issue as both the polyfill and *-page.js files are already minified. Amounts to Chrome users having a very slightly larger install.

Whoops! We had trouble minifying "dist/chrome/about-page.js". Perhaps you need to use mix.babel() instead?

 DONE  Compiled successfully in 2896ms                                                                                                                                                              17:18:22

Whoops! We had trouble minifying "dist/chrome/about-page.js". Perhaps you need to use mix.babel() instead?

/pull-tabs/node_modules/laravel-mix/src/plugins/CustomTasksPlugin.js:66
                    throw e;
                    ^
SyntaxError: Unexpected token: punc ())
    at JS_Parse_Error.get (eval at <anonymous> (/pull-tabs/node_modules/uglify-js/tools/node.js:27:1), <anonymous>:86:23)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pulltabs@0.12.0 production: `NODE_ENV=production webpack --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the pulltabs@0.12.0 production script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.