Open approached opened 10 months ago
I don’t think it will be easy to migrate from babel to bun sadly. Even if mjml works perfectly fine with bun.On 6 Nov 2023, at 13:14, Alexej Kloos @.***> wrote: Describe the bug Not possible to build via bun. To Reproduce
Create a file:
import mjml2html from "mjml";
/ Compile an mjml string / const htmlOutput = mjml2html( `
`, );
/ Print the responsive HTML generated and MJML errors if any / console.log(htmlOutput);
Build
bun build --sourcemap=external --target=bun ./src/test.ts --outdir ./build && bun run ./build/test.js Expected behavior test.js 3076.02 KB
test.js.map 5568.02 KB
[107ms] bundle 665 modules SyntaxError: Unexpected keyword 'export' at .../api/build/test.js:70860 error: script "testfile" exited with code 1 (SIGHUP)
Line 70860:
exports.FILES = [
"......../api/node_modules/uglify-js/tools/exports.js"
];
new Function("domprops", "exports", function() {
var code = exports.FILES.map(function(file) {
return fs.readFileSync(file, "utf8");
});
code.push("exports.describe_ast = " + describe_ast.toString());
return code.join("\n\n");
}())(require_domprops(), exports);
if (+process.env["UGLIFY_BUG_REPORT"]) {
var $minify = function(files, options) {
if (typeof options == "undefined")
options = "<
export { $minify as minify };
} What the hell is export { $minify as minify }; ?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>
The package uglify-js has follow dependency: mjml > mjml-core > html-minifier > uglify-js
The package https://github.com/kangax/html-minifier would not be maintained. The last version ist from Apr 1, 2019 👎
Script flow:
I think if uglify-js is fixed. Than it will work. I made some test that can be work 👍
Ohh last update of https://github.com/mishoo/UglifyJS/ was: Oct 23, 2022
Describe the bug Not possible to build via bun.
To Reproduce
/ Compile an mjml string / const htmlOutput = mjml2html( `
`, );
/ Print the responsive HTML generated and MJML errors if any / console.log(htmlOutput);
Expected behavior
Line 70860:
What the hell is export { $minify as minify }; ?