Comments (5)
@nlemoine Hey, I'm not sure if that would be possible as we have to maintain compatibility with ES6 as well.
You can use a babel transform with your Browserify. This should help you out - https://github.com/babel/babelify
Closing this for now, as ES6 imports already work. Feel free to let know if you face difficulties.
from micromodal.
Thanks for your feedback.
I'm already using babelify (my project code is ES6) but I'm having the same issue described here: babel/babelify#247
Maybe a babelify issue but I'm wondering how this can work as babelify presets aren't always the same across projects (using global: true
results in a error saying Couldn't find preset "latest"
). See last comment here: babel/babelify#215 (comment)
I think you can keep your original code in ES6 and provide multiple versions allowing developers to select the one depending on their environment. See: https://medium.com/@tarkus/how-to-build-and-publish-es6-modules-today-with-babel-and-rollup-4426d9c7ca71
Anyway, I fixed my issue for now using the dist version: import micromodal from 'micromodal/dist/micromodal'
from micromodal.
@ghosh Please see: https://github.com/rollup/rollup-plugin-babel#external-dependencies
Would you consider reopening the issue?
from micromodal.
@nlemoine Thanks for the update and the relevant documentation.
Will look into it.
from micromodal.
Thanks for considering the request! 👍
from micromodal.
Related Issues (20)
- Modals closing unexpectedly with any interaction HOT 3
- modal input label is triggering other input fields on the main page HOT 2
- Breaking change in 0.4.9: clicking the container closes the modal HOT 8
- Modal reopens after closing
- hi
- target argument is getting the parent on Safari. OnShow method. HOT 3
- Tab trapping does not work in Safari HOT 1
- onClose event is not triggered when clicking on the modal overlay HOT 7
- Window object doesn't work during gatsby build. HOT 1
- Feature idea: "non-dismissable" option HOT 1
- Esc and focus trap does not work if iframe is inside the modal HOT 3
- Modal closes when selecting a field. HOT 5
- Micromodal js not working on IOS devices HOT 5
- Add option to control whether disable Escape to close modal HOT 3
- Slick Slider HOT 1
- Nested modals don't close properly via JS api HOT 1
- Is this still being maintained? HOT 3
- Click Function For Element inside Modal Generates Error HOT 1
- "awaitCloseAnimation: true" does not sum the duration of all animations.
- Hard to intigrate in HTML HOT 2
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 micromodal.