Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do not throw error on absolute windows paths #166

Merged
merged 1 commit into from Dec 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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