New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simple transformer for ECMAScript 2015 modules via gulp? #9274
Comments
Hey @QJan84! We really appreciate you taking the time to report an issue. The collaborators If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack |
I'm not sure that I understood the question: do you want those modules to be inserted in the output file? Is yes, I suggest looking at Rollup or WebPack. |
Exactly! But how does it work with gulp-newer? The task should only start if files have been changed. Maybe webpack-stream? |
Is there no way to do that with babel? I thought this is the @babel/preset-env there? Is it really that hard to get it? I just want the scripts |
Babel only transpiles a single file, it can't merge multiple files. If you don't want to use a module bundler, you could set the |
Am I the first one to have this problem ?! It is to be crazy...
My Output: (tried to import swiper.js - a touch slider)
My terminal log:
|
Webpack's docs have examples of how to use it with Gulp: https://github.com/webpack/docs/wiki/usage-with-gulp#normal-compilation Using streams is not necessary, I'd use the callback-based task interface. |
How can I insert functions via import into a .js file?
My source test script (test.js):
I use gulp-babel as JavaScript Transpiler.
My babel devDependencies.
My .babelrc:
After I started the gulp task I get the following:
But now animejs and flatpickr should be included in the file.
The text was updated successfully, but these errors were encountered: