未验证 提交 f46b80ae 编写于 作者: T tasshi / Masaharu TASHIRO 提交者: GitHub

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: NLukas Taegert-Atkinson <lukas.taegert-atkinson@tngtech.com>
上级 526b97e5
......@@ -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",
......
export { default as rollup } from './rollup/rollup';
export { default as rollup, defineConfig } from './rollup/rollup';
export { version as VERSION } from 'package.json';
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';
module.exports = {
description: 'uses cjs config file which return config wrapped by defineConfig',
command: 'rollup --config rollup.config.js',
execute: true
};
const { defineConfig } = require("../../../../dist/rollup");
module.exports = defineConfig({
input: 'main.js',
output: {
format: 'cjs'
},
});
module.exports = {
description: 'uses mjs config file which return config wrapped by defineConfig',
command: 'rollup --config rollup.config.mjs',
minNodeVersion: 13,
execute: true
};
import { defineConfig } from "../../../../dist/es/rollup.js"
export default defineConfig({
input: 'main.js',
output: {
format: 'cjs'
},
});
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册