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

fix: export rollup.defineConfig at runtime #4134

Merged
merged 4 commits into from Jun 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -15,7 +15,7 @@
"ci:lint": "npm run lint:nofix",
"ci:test": "npm run build:cjs && npm run build:bootstrap && npm run test:all",
"ci:test:only": "npm run build:cjs && npm run build:bootstrap && npm run test:only",
"ci:coverage": "npm run build:cjs && nyc --reporter lcovonly mocha",
"ci:coverage": "npm run build:cjs && npm run build:bootstrap && nyc --reporter lcovonly mocha",
"lint": "npx eslint . --fix --cache && npm run lint:markdown",
"lint:nofix": "npx eslint . && npm run lint:markdown",
"lint:markdown": "markdownlint --config markdownlint.json docs/**/*.md",
Expand Down
2 changes: 1 addition & 1 deletion src/browser-entry.ts
@@ -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';
2 changes: 1 addition & 1 deletion src/node-entry.ts
@@ -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';
5 changes: 5 additions & 0 deletions test/cli/samples/config-defineConfig-cjs/_config.js
@@ -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
};
1 change: 1 addition & 0 deletions test/cli/samples/config-defineConfig-cjs/main.js
@@ -0,0 +1 @@
module.exports = 42;
8 changes: 8 additions & 0 deletions test/cli/samples/config-defineConfig-cjs/rollup.config.js
@@ -0,0 +1,8 @@
const { defineConfig } = require("../../../../dist/rollup");

module.exports = defineConfig({
input: 'main.js',
output: {
format: 'cjs'
},
});
6 changes: 6 additions & 0 deletions test/cli/samples/config-defineConfig-mjs/_config.js
@@ -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
};
1 change: 1 addition & 0 deletions test/cli/samples/config-defineConfig-mjs/main.js
@@ -0,0 +1 @@
module.exports = 42;
8 changes: 8 additions & 0 deletions test/cli/samples/config-defineConfig-mjs/rollup.config.mjs
@@ -0,0 +1,8 @@
import { defineConfig } from "../../../../dist/es/rollup.js"

export default defineConfig({
input: 'main.js',
output: {
format: 'cjs'
},
});