Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: export
rollup.defineConfig
at runtime (#4134)
* fix: export `rollup.defineConfig` at Node.js runtime * fix: export `rollup.defineConfig` at browser runtime * test: add test of `rollup.defineConfig` (cjs, mjs) * Also use bootstrap for coverage build Co-authored-by: Lukas Taegert-Atkinson <lukas.taegert-atkinson@tngtech.com>
- Loading branch information
1 parent
526b97e
commit f46b80a
Showing
9 changed files
with
32 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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
export { default as rollup } from './rollup/rollup'; | ||
export { default as rollup, defineConfig } from './rollup/rollup'; | ||
export { version as VERSION } from 'package.json'; |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export { default as rollup } from './rollup/rollup'; | ||
export { default as rollup, defineConfig } from './rollup/rollup'; | ||
export { default as watch } from './watch/watch-proxy'; | ||
export { version as VERSION } from 'package.json'; |
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,5 @@ | ||
module.exports = { | ||
description: 'uses cjs config file which return config wrapped by defineConfig', | ||
command: 'rollup --config rollup.config.js', | ||
execute: true | ||
}; |
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 @@ | ||
module.exports = 42; |
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,8 @@ | ||
const { defineConfig } = require("../../../../dist/rollup"); | ||
|
||
module.exports = defineConfig({ | ||
input: 'main.js', | ||
output: { | ||
format: 'cjs' | ||
}, | ||
}); |
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,6 @@ | ||
module.exports = { | ||
description: 'uses mjs config file which return config wrapped by defineConfig', | ||
command: 'rollup --config rollup.config.mjs', | ||
minNodeVersion: 13, | ||
execute: true | ||
}; |
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 @@ | ||
module.exports = 42; |
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,8 @@ | ||
import { defineConfig } from "../../../../dist/es/rollup.js" | ||
|
||
export default defineConfig({ | ||
input: 'main.js', | ||
output: { | ||
format: 'cjs' | ||
}, | ||
}); |