Skip to content

Commit

Permalink
build: refactor rollup config
Browse files Browse the repository at this point in the history
  • Loading branch information
RebeccaStevens committed Apr 1, 2024
1 parent 68e6450 commit deb1712
Showing 1 changed file with 20 additions and 28 deletions.
48 changes: 20 additions & 28 deletions rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@ const treeshake = {
const classicCJS = {
input: "src/classic.ts",

output: [
{
file: pkg.exports["."].require,
format: "cjs",
sourcemap: false,
},
],
output: {
file: pkg.exports["."].require,
format: "cjs",
sourcemap: false,
},

plugins: [
rollupPluginAutoExternal(),
Expand Down Expand Up @@ -51,13 +49,11 @@ const classicCJS = {
const classicESM = {
input: "src/classic.ts",

output: [
{
file: pkg.exports["."].import,
format: "esm",
sourcemap: false,
},
],
output: {
file: pkg.exports["."].import,
format: "esm",
sourcemap: false,
},

plugins: [
rollupPluginAutoExternal(),
Expand Down Expand Up @@ -87,13 +83,11 @@ const classicESM = {
const flatCJS = {
input: "src/flat.ts",

output: [
{
file: pkg.exports["./flat"].require,
format: "cjs",
sourcemap: false,
},
],
output: {
file: pkg.exports["./flat"].require,
format: "cjs",
sourcemap: false,
},

plugins: [
rollupPluginAutoExternal(),
Expand Down Expand Up @@ -123,13 +117,11 @@ const flatCJS = {
const flatESM = {
input: "src/flat.ts",

output: [
{
file: pkg.exports["./flat"].import,
format: "esm",
sourcemap: false,
},
],
output: {
file: pkg.exports["./flat"].import,
format: "esm",
sourcemap: false,
},

plugins: [
rollupPluginAutoExternal(),
Expand Down

0 comments on commit deb1712

Please sign in to comment.