@repodog/rollup-config 4.0.6 → 4.0.7

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.cjs +3 -3
  2. package/package.json +1 -1
package/index.cjs CHANGED
@@ -4,7 +4,7 @@ const json = require('@rollup/plugin-json');
4
4
  const { nodeResolve } = require('@rollup/plugin-node-resolve');
5
5
  const terser = require('@rollup/plugin-terser');
6
6
  const { existsSync, mkdirSync, writeFileSync } = require('node:fs');
7
- const { basename } = require('node:path');
7
+ const { basename, isAbsolute, resolve } = require('node:path');
8
8
  const { plugin: analyzer } = require('rollup-plugin-analyzer');
9
9
  const copy = require('rollup-plugin-copy');
10
10
  const sourcemaps = require('rollup-plugin-sourcemaps');
@@ -12,7 +12,7 @@ const sourcemaps = require('rollup-plugin-sourcemaps');
12
12
  const { MODULE_SYSTEM = 'esm', NODE_ENV } = process.env;
13
13
  const isProdEnv = NODE_ENV === 'production';
14
14
  const packageDir = process.cwd();
15
- const external = id => !id.startsWith('.') && !id.startsWith('/') && !id.startsWith('#');
15
+ const external = id => !id.startsWith('.') && !id.startsWith('#') && !isAbsolute(id);
16
16
  const outputExtension = MODULE_SYSTEM === 'esm' ? 'mjs' : 'cjs';
17
17
 
18
18
  const sourcemapPathTransform = sourcePath => {
@@ -66,7 +66,7 @@ const config = (options = {}) => {
66
66
 
67
67
  return {
68
68
  external,
69
- input: `${packageDir}/src/index`,
69
+ input: resolve(packageDir, 'src', 'index'),
70
70
  onwarn: ({ code, message }) => {
71
71
  if (code !== 'THIS_IS_UNDEFIEND') {
72
72
  console.error(message);
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.6",
4
+ "version": "4.0.7",
5
5
  "author": "Dylan Aubrey",
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/badbatch/repodog",