@repodog/rollup-config 4.0.11 → 4.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.mjs +3 -11
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4,7 +4,7 @@ import json from '@rollup/plugin-json';
4
4
  import { nodeResolve } from '@rollup/plugin-node-resolve';
5
5
  import terser from '@rollup/plugin-terser';
6
6
  import { existsSync, mkdirSync, writeFileSync } from 'node:fs';
7
- import { basename, isAbsolute, resolve } from 'node:path';
7
+ import { isAbsolute, resolve } from 'node:path';
8
8
  import analyzer from 'rollup-plugin-analyzer';
9
9
  import copy from 'rollup-plugin-copy';
10
10
  import sourcemaps from 'rollup-plugin-sourcemaps';
@@ -16,22 +16,15 @@ const packageDir = process.cwd();
16
16
  const external = id => !id.startsWith('.') && !id.startsWith('#') && !isAbsolute(id);
17
17
  const outputExtension = MODULE_SYSTEM === 'esm' ? 'mjs' : 'cjs';
18
18
 
19
- const sourcemapPathTransform = sourcePath => {
20
- if (/node_modules/.test(sourcePath)) {
21
- return sourcePath;
22
- }
23
-
24
- return sourcePath.replace('../../src', `../${basename(packageDir)}/src/`);
25
- };
26
-
27
19
  const config = (options = {}) => {
28
20
  console.log(`> Using @repodog/${options.compiler.name}-config`);
29
- const extensions = ['.mjs', '.cjs', '.js', '.jsx', '.json', '.ts', '.tsx'];
30
21
 
31
22
  if (!options.compiler) {
32
23
  throw new Error('config.compiler is a required option. Both babel and swc rollup plugins are supported.');
33
24
  }
34
25
 
26
+ const extensions = ['.mjs', '.cjs', '.js', '.jsx', '.json', '.ts', '.tsx'];
27
+
35
28
  const plugins = [
36
29
  json(),
37
30
  nodeResolve({
@@ -78,7 +71,6 @@ const config = (options = {}) => {
78
71
  file: `${packageDir}/dist/${MODULE_SYSTEM}/index.${outputExtension}`,
79
72
  format: MODULE_SYSTEM,
80
73
  sourcemap: true,
81
- sourcemapPathTransform,
82
74
  },
83
75
  plugins,
84
76
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@repodog/rollup-config",
3
3
  "description": "The Repodog Rollup config module.",
4
- "version": "4.0.11",
4
+ "version": "4.0.13",
5
5
  "author": "miami-man",
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/badbatch/repodog",