Skip to content

Commit 42d4951

Browse files
committed
fix(bundless): ensure absolute path is returned for external imports
1 parent 7e472a1 commit 42d4951

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

internal/plugin/bundless.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ var Bundless = esbuild.Plugin{
173173

174174
if newPath != "" {
175175
result.Path = newPath
176-
} else if strings.HasPrefix(result.Path, root) {
176+
} else if result.External && strings.HasPrefix(result.Path, root) {
177177
result.Path = strings.TrimPrefix(result.Path, root)
178178
}
179179
}

internal/plugin/css.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ var Css = esbuild.Plugin{
1717

1818
build.OnLoad(esbuild.OnLoadOptions{Filter: `\.css$`},
1919
func(args esbuild.OnLoadArgs) (esbuild.OnLoadResult, error) {
20-
// pp.Println("[6] filter(.css$)", args)
20+
// pp.Println("[cssPlugin.onLoad] args:", args)
2121

2222
var pluginData types.PluginData
2323
if args.PluginData != nil {

0 commit comments

Comments
 (0)