Skip to content

Commit

Permalink
fix: do not throw error on absolute windows paths (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Dec 6, 2022
1 parent 9d7001d commit 8c57847
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/builder/rollup.ts
Expand Up @@ -8,7 +8,7 @@ import { nodeResolve } from "@rollup/plugin-node-resolve";
import alias from "@rollup/plugin-alias";
import dts from "rollup-plugin-dts";
import replace from "@rollup/plugin-replace";
import { resolve, dirname, normalize, extname } from "pathe";
import { resolve, dirname, normalize, extname, isAbsolute } from "pathe";
import { resolvePath, resolveModuleExportNames } from "mlly";
import { getpkg, tryResolve, warn } from "../utils";
import type { BuildContext } from "../types";
Expand Down Expand Up @@ -172,7 +172,7 @@ export function getRollupOptions (ctx: BuildContext): RollupOptions {
if (isExplicitExternal) {
return true;
}
if (ctx.options.rollup.inlineDependencies || id[0] === "." || id[0] === "/" || /src[/\\]/.test(id) || id.startsWith(ctx.pkg.name!)) {
if (ctx.options.rollup.inlineDependencies || id[0] === "." || isAbsolute(id) || /src[/\\]/.test(id) || id.startsWith(ctx.pkg.name!)) {
return false;
}
if (!isExplicitExternal) {
Expand Down

0 comments on commit 8c57847

Please sign in to comment.