Comments (3)
@ydatech CRA uses Webpack@^3 which is bundled with a version of UglifyJS that does not support ES6. Webpack@^4 is bundled with a new version of UglifyJS that can parse ES6.
Four solutions here :
- Waiting for https://github.com/facebook/create-react-app/pull/4077 to be merged
- Add a transpilation step with Babel in
electron-push-receiver
- Eject from CRA and update your webpack config with an imported version of UglifyJS (not the bundled one)
- Eject from CRA and update your webpack config to make it transpile
electron-push-receiver
from electron-push-receiver.
@MatthieuLemoine
I have fixed the issue by moving constants from src/constants/index.js
file to local variable in entrypoint src/index.js
.. and also I changed the dependency of push-receiver to dev-master because it also causes build error if we use latest stable version..
Note: Create React App can consume both CommonJS and ES modules. For Node.js compatibility, it is recommended that the main entry point is CommonJS. However, they can optionally provide an ES module entry point with the module field in package.json. Note that even if a library provides an ES Modules version, it should still precompile other ES6 features to ES5 if it intends to support older browsers.
this is my fork: https://github.com/ydatech/electron-push-receiver
from electron-push-receiver.
Fixed in v2.1.2 thanks to @NBoychev #36
from electron-push-receiver.
Related Issues (20)
- receiving all the notifications when open the app HOT 3
- Force the FCM connection via a proxy?
- How to add an image on notification HOT 1
- TypeError: Cannot read property 'fcm' of undefined (MAC OS system)
- How to display icon HOT 1
- PUSH_RECEIVER:::Error while starting the service TypeError: Object has been destroyed HOT 1
- A javascript error occurred in the main process
- Getting a token, but not receiving any messages, please help! HOT 1
- trouble with ElectronForge webpack plugin HOT 1
- The service is currently unavailable HOT 20
- Is local time used for connecting to FCM server?
- Cannot read property 'fcm' of null HOT 1
- Exception from outdated electron-config module on newer version of Electron HOT 5
- macOS > Not work
- Cannot find module "electron-push-receiver"
- Hello MatthieuLemoine
- Suddenly not receiving notifications anymore. HOT 2
- persistentIds grows without bound? HOT 2
- Is it possible to receive notifications using port 443? HOT 1
- cannot generate a FCM token using electron-push-receiver
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from electron-push-receiver.