relay-plugin-rollup-preset/dist/index.js

21 lines
686 B
JavaScript
Raw Normal View History

2022-12-14 14:54:58 +00:00
import { defineConfig } from "rollup";
import commonjs from "@rollup/plugin-commonjs";
import { nodeResolve } from "@rollup/plugin-node-resolve";
import { bundleNativeModulesPlugin } from "@lumeweb/rollup-plugin-bundle-native-modules";
2022-12-14 15:04:02 +00:00
import typescript from "@rollup/plugin-typescript";
import json from "@rollup/plugin-json";
2022-12-14 15:22:16 +00:00
export default function preset() {
2022-12-14 17:33:15 +00:00
return defineConfig({
plugins: [
typescript(),
json(),
2022-12-14 18:14:24 +00:00
bundleNativeModulesPlugin(),
2023-01-01 17:17:02 +00:00
nodeResolve({
mainFields: ["main"],
exportConditions: ["node", "require", "default"],
}),
2022-12-14 17:33:15 +00:00
commonjs(),
],
});
2022-12-14 15:22:16 +00:00
}