Closed cwalv closed 4 years ago
I have solved the problem, but my code environment is vue.js
You can look at this link, may be helpful: http://www.ruanyifeng.com/blog/2016/01/babel.html
Alternatively, Babel provides a REPL online compiler that can convert ES6 code to ES5 code online. The converted code can be run directly as an ES5 code into a web page. Open the following link: https://babeljs.io/repl/#?babili=false&evaluate=true&lineWrap=false&presets=es2015%2Creact%2Cstage-2&targets=&browsers=&builtIns=false&debug=false&code=
It is the "let" statements in the updated jQueryShim.js file. But I don't see a problem with the babel settings. Yet. But I'm getting the same error and I didn't with my fork.
Removed signalr-no-jquery. Removed babel-loader and upgraded to babel-loader v7. Reinstalled signalr-no-jquery and it passes with no UglifyJs errors. Not sure if this is the exact sequence because I was trying a bunch of things, but it is working now.
Running into the same issue. I don't use babel-loader.
ERROR in main.5b60de6b565acc47a65a.min.js from UglifyJs Unexpected token: name (events) [C:/Users/rob/Documents/Web/~/source-map-loader!C:/Users/rob/Documents/Web/~/signalr-no-jquery/build/jQueryShim.js:7,0][main.5b60de6b565acc47a65a.min.js:25643,6]
Solved for my TypeScript Webpack build. I installed babel-loader, babel-core and babel-preset-es2015 and then added the following to my production webpack config.
{ test: /.js$/, loader: 'babel-loader', query: { presets: ['es2015'] }, include: resolve(__dirname, "../../../../node_modules/signalr-no-jquery"), }
Actually... It compiles, but it breaks IE11 and Edge. Can you please ship ES5 transpiled versions of the code? Users really should not have to try and transpile code in node_modules.
Thanks for reporting the problem. Has anyone fixed his version in a fork and can make a pull request?
PR created
Can someone please review my PR
merged
including this in a create-react-app project, with 0.1.6 everything built fine, but with 0.1.7 I get: