Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[v3.0] Run output plugins last (#3846)
* fix: run output plugins last * Add test Co-authored-by: Lukas Taegert-Atkinson <lukas.taegert-atkinson@tngtech.com>
- Loading branch information
1 parent
3030e2f
commit 7ac67f8
Showing
5 changed files
with
34 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
module.exports = { | ||
description: 'runs output plugins last', | ||
options: { | ||
plugins: [ | ||
{ | ||
name: 'input', | ||
renderChunk(code) { | ||
return `/* input */\n${code}\n/* input */`; | ||
} | ||
} | ||
], | ||
output: { | ||
plugins: [ | ||
{ | ||
name: 'output', | ||
renderChunk(code) { | ||
return `/* output */\n${code}\n/* output */`; | ||
} | ||
} | ||
] | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* output */ | ||
/* input */ | ||
let foo = 'base'; | ||
|
||
export { foo }; | ||
/* input */ | ||
/* output */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export let foo = 'base'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters