-
Notifications
You must be signed in to change notification settings - Fork 12.8k
add module:ignore option #3300
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
Comments
can you specify more details on the generated output. so how would |
Hello! it seems they just strip module information as seen here in documentation : https://babeljs.io/docs/usage/modules/ They gave an example :
Will give :
It is probably not as robust as you may want. |
I am not sure i understand how this is meant to be used later. looking at babel's output in this case: import {foo as foobar} from "foo";
export function bar() {
return foobar("foobar");
} emits with "use strict";
exports.bar = bar;
Object.defineProperty(exports, "__esModule", {
value: true
});
var foobar = require("foo").foo;
function bar() {
return foobar("foobar");
} so you still have a call to |
Hi, let me talk to you about my use case, it will probably help to understand why i hope to have this kind of feature (and for for your time by the way!). I'm coding using ES6 module and i want to be able to produce ES5 code without having to use commonjs or AMD module things the same way we can do using Typescript module. For now, i must use a third party solution (babel for example) in order to have ES5 code without this external module things. Since we can do it with Typescript module, i was hopping that we can also ask to the compiler to output ES5 code without having to depend on commonjs/amd/... To come back to mhegazy, i didn't included a librairie to handle those require calls. They may be changed it, i'll check this point to see if the ES5 code rely on another component in order to load |
Hi @bidiboom, are you asking for us to concatenate the code of imported modules in place of loading them at runtime? |
@bidiboom what is the difference between |
Hi! Sorry for responding this late. Wasn't around for some time. Actually after reading some other opened items i saw this one #17 which is exactly what i want to achieve with this kind of options. I suggested the module:ignore to achieve what is described in the ticket (be able to concatenate every file into a single one). |
i see. closing this then in favor of #17. |
Hi,
when using ES6 module spec and try to generate ES5 code, the compiler invite me to specify a module type for the output : amd|commonjs. Is it possible to add ignore like in babeljs so we can concatenate output into a single file without having to use an extra tool to do the operation please ?
The text was updated successfully, but these errors were encountered: