*Update dist
This commit is contained in:
parent
7776703d3f
commit
a008816085
|
@ -1,2 +1,3 @@
|
||||||
import { RollupOptions } from "rollup";
|
import { RollupOptions } from "rollup";
|
||||||
export default function preset(): RollupOptions;
|
import { RollupNodeResolveOptions } from "@rollup/plugin-node-resolve";
|
||||||
|
export default function preset(globalOptions: RollupOptions, resolveOptions?: RollupNodeResolveOptions, commonJsOptions?: any): RollupOptions;
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
import { defineConfig } from "rollup";
|
import { defineConfig } from "rollup";
|
||||||
import commonjs from "@rollup/plugin-commonjs";
|
import commonjs from "@rollup/plugin-commonjs";
|
||||||
import { nodeResolve } from "@rollup/plugin-node-resolve";
|
import { nodeResolve, } from "@rollup/plugin-node-resolve";
|
||||||
import { bundleNativeModulesPlugin } from "@lumeweb/rollup-plugin-bundle-native-modules";
|
import { bundleNativeModulesPlugin } from "@lumeweb/rollup-plugin-bundle-native-modules";
|
||||||
import typescript from "@rollup/plugin-typescript";
|
import typescript from "@rollup/plugin-typescript";
|
||||||
import json from "@rollup/plugin-json";
|
import json from "@rollup/plugin-json";
|
||||||
export default function preset() {
|
// @ts-ignore
|
||||||
return defineConfig({
|
import merger from "object-merger";
|
||||||
|
export default function preset(globalOptions, resolveOptions = {}, commonJsOptions = {}) {
|
||||||
|
return merger(globalOptions, defineConfig({
|
||||||
plugins: [
|
plugins: [
|
||||||
typescript(),
|
typescript(),
|
||||||
json(),
|
json(),
|
||||||
|
@ -13,8 +15,9 @@ export default function preset() {
|
||||||
nodeResolve({
|
nodeResolve({
|
||||||
mainFields: ["main"],
|
mainFields: ["main"],
|
||||||
exportConditions: ["node", "require", "default"],
|
exportConditions: ["node", "require", "default"],
|
||||||
|
...resolveOptions,
|
||||||
}),
|
}),
|
||||||
commonjs(),
|
commonjs(commonJsOptions),
|
||||||
],
|
],
|
||||||
});
|
}));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue