The Wayback Machine - https://web.archive.org/web/20211014015322/https://github.com/developit/microbundle/issues/497
Skip to content
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

Preserve trailing newline in mangle.json #497

Open
developit opened this issue Oct 18, 2019 · 1 comment · May be fixed by #882
Open

Preserve trailing newline in mangle.json #497

developit opened this issue Oct 18, 2019 · 1 comment · May be fixed by #882

Comments

@developit
Copy link
Owner

@developit developit commented Oct 18, 2019

Currently, mangle.json writes always remove a trailing newline from the file. We could detect the existence of the trailing newline when reading, then preserve whatever was used when writing.

See https://github.com/preactjs/preact/blob/e22cc99ca398bb0a417ccc151a520c41215afe55/.editorconfig#L17-L22

@mclizz
Copy link

@mclizz mclizz commented Dec 1, 2019

<!doctype html>

<script defer> // modernBuild = Modules + Dynamic Import support import('./dist/test.js'); window.modernBuild = true; </script> <script defer> if (!window.modernBuild) { document.head.appendChild(Object.assign(document.createElement('script'), { src: './jspm_packages/npm/[email protected]/dist/s.min.js', onload: function () { System.import('./dist-system/test.js'); } })); } </script>

make-github-pseudonymous-again added a commit to make-github-pseudonymous-again/set-alarm that referenced this issue Mar 6, 2021
Otherwise the `build` script modifies tracked files.

See developit/microbundle#497.
MiKr13 added a commit to MiKr13/microbundle that referenced this issue Aug 22, 2021
this commit adds editorconfig & index.js changes to enable trailing new line detection & addition in mangle.json

*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants