Skip to content

Commit

Permalink
build: share rollup config
Browse files Browse the repository at this point in the history
  • Loading branch information
wheresrhys committed Jul 24, 2024
1 parent f47a4a2 commit 6d4b0a5
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 36 deletions.
20 changes: 2 additions & 18 deletions packages/core/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,18 +1,2 @@
import { nodeResolve } from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import { writeFile, mkdir } from 'fs/promises';
export default {
input: './src/index.js',
output: {
dir: './dist',
entryFileNames: 'commonjs.js',
format: 'commonjs',
},
plugins: [
nodeResolve({ preferBuiltins: false }),
commonjs(),
// sourcemaps(),
// builtins(),
// globals(),
],
};
import rollupConfig from '../../shared-rollup.config.js';
export default rollupConfig;
20 changes: 2 additions & 18 deletions packages/fetch-mock/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,18 +1,2 @@
import { nodeResolve } from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import { writeFile, mkdir } from 'fs/promises';
export default {
input: './src/index.js',
output: {
dir: './dist',
entryFileNames: 'commonjs.js',
format: 'commonjs',
},
plugins: [
nodeResolve({ preferBuiltins: false }),
commonjs(),
// sourcemaps(),
// builtins(),
// globals(),
],
};
import rollupConfig from '../../shared-rollup.config.js';
export default rollupConfig;
18 changes: 18 additions & 0 deletions shared-rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { nodeResolve } from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import { writeFile, mkdir } from 'fs/promises';
export default {
input: './src/index.js',
output: {
dir: './dist',
entryFileNames: 'commonjs.js',
format: 'commonjs',
},
plugins: [
nodeResolve({ preferBuiltins: false }),
commonjs(),
// sourcemaps(),
// builtins(),
// globals(),
],
};

0 comments on commit 6d4b0a5

Please sign in to comment.