Comments (8)
Thank you for this issue.
I guess that you used a minifier which doesn't support ES2015, then it was thrown at ES2015 syntax. Please try to transpile both abort-controller and event-target-shim also by Babel.
from event-target-shim.
+1, this is the only module that doesn't build out of a few hundred.
from event-target-shim.
@Antman261 and @braco, I found two workarounds for this but neither one is satisfying:
- Copy abort-controller.js, abort-signal.js and event-target-shim.js to your own project and change the import statements to match.
- eject and comment out or delete the initialization of webpack.optimize.UglifyJsPlugin in you webpack.config.production.
I don't like either workaround. (2) makes the output bundle twice as big.
The basic problem is that it was written in ES6 and needs to be transpiled to ES5 to meet CRA's expectation for everything under node_modules/. An easy fix is to transpile the code to ES5, but the authors already set it up this way and changing it might break it for others that are already using it.
Feel free to share any thoughts. abort-controller et al are highly useful modules for some apps and I'd like to be able to use them in other projects with less resistance.
from event-target-shim.
I think Webpack 4 supports ES2015 in minification.
from event-target-shim.
Sounds good, but both the master branch and the latest release of react-scripts (packaged with with create-react-app) is still importing [email protected]. Until then, I have no choice but to suffice with one of the workarounds I mentioned.
from event-target-shim.
same issue here but i'm running Webpack 4
this is the only node_module that is not already transpiled to ES5
from event-target-shim.
I believe this problem will be fixed by #23
from event-target-shim.
I had intended this package is used along with bundlers, and if you want to support IE11, you should configure your bundlers to transpile application.
But, as mentioned, some build tools don't look transpiling node_modules.
Therefore, since 6.0.0, this package includes ES5 build. Use import {} from "event-target-shim/es5"
instead.
from event-target-shim.
Related Issues (20)
- Infinite recursion "'this' is expected an EventTarget object, but got [object Object]' HOT 9
- Feature request: make defineEventAttribute variadic HOT 1
- Error from event listeners don't trigger global `uncaughtException` events HOT 1
- Please remove extra comma in console.xxx() arguments HOT 4
- Change `srcElement` to `EventTarget` type once TS3.4 is out. HOT 1
- Rollup is emitting non-ES5 build for `dist/event-target-shim.js` HOT 2
- Infinite recursion with @sentry/browser HOT 3
- console.assert is not a function HOT 2
- EventTarget breaks on IE HOT 4
- export event? HOT 1
- Support signal in `addEventListener` HOT 1
- Support for CustomEvent HOT 1
- Implement `legacyOutputDidListenersThrowFlag` HOT 2
- Webpack breaking change: The extension in the request is mandatory HOT 8
- index.d.ts produces errors in Typescript HOT 2
- `EventTarget` (and the `Event` type) are incompatible with typescript's `CustomEvent` type HOT 1
- Add support for event propagation
- Can't console.log() event instance in Node HOT 1
- `EventTarget.removeEventListener` called from within listener callback results in index out of bounds access
- Uncaught TypeError: EventTarget.dispatchEvent: Argument 1 does not implement interface Event.
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 event-target-shim.