Skip to content
This repository was archived by the owner on Jul 17, 2024. It is now read-only.

Commit

Permalink
fix: append empty line in js files
Browse files Browse the repository at this point in the history
  • Loading branch information
Timeraa committed Oct 31, 2022
1 parent fb1211f commit 99bb18b
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 4 deletions.
15 changes: 13 additions & 2 deletions bin/actions/modify.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "pmd",
"description": "CLI for creating, modifying & translating Presences.",
"version": "1.1.0",
"version": "1.1.1",
"author": "Timeraa <[email protected]>",
"main": "src/index.ts",
"license": "MPL-2.0",
Expand Down
15 changes: 14 additions & 1 deletion src/actions/modify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,20 @@ class Compiler {
}),
new webpack.WatchIgnorePlugin({
paths: [/\.js$/, /\.d\.[cm]ts$/]
})
}),
{
apply(compiler) {
compiler.hooks.emit.tap("PresenceCompiler", compilation => {
//* Add empty line after file content to prevent errors from PreMiD
for (const file in compilation.assets) {
//* Check if file is a .js file
if (!file.endsWith(".js")) continue;
//@ts-expect-error - This is defined. (ConcatSource class)
compilation.assets[file].add("\n");
}
});
}
}
],
module: {
rules: [
Expand Down

0 comments on commit 99bb18b

Please sign in to comment.