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

url as path in the resolveId function of a plugin is broken from beta 51 #1798

Closed
gawlk opened this issue Jan 29, 2021 · 0 comments
Closed

Comments

@gawlk
Copy link

gawlk commented Jan 29, 2021

Hi !

This code worked in beta 50 and less:

resolveId(id) {
            if (id.startsWith('/cdn/')) {
                id = id.substring(5)
                return (
                    `${base}${prefix}${id}` +
                    (locked[id] ? `@${locked[id]}` : '') +
                    postfix
                )
            }
        },

but doesn't from beta 51

It throughs this error:

error when starting dev server:
Error: Build failed with 1 error:
html:/Users/k/code/vue/n/src/pages/Index.vue:2:22: error: Could not read from file: /Users/k/code/vue/n/https:/cdn.skypack.dev/jssha
    at failureErrorWithLog (/Users/k/code/vue/n/node_modules/esbuild/lib/main.js:969:15)
    at buildResponseToResult (/Users/k/code/vue/n/node_modules/esbuild/lib/main.js:767:32)
    at /Users/k/code/vue/n/node_modules/esbuild/lib/main.js:819:20
    at handleIncomingPacket (/Users/k/code/vue/n/node_modules/esbuild/lib/main.js:566:9)
    at Socket.readFromStdout (/Users/k/code/vue/n/node_modules/esbuild/lib/main.js:482:7)
    at Socket.emit (node:events:379:20)
    at addChunk (node:internal/streams/readable:313:12)
    at readableAddChunk (node:internal/streams/readable:288:9)
    at Socket.Readable.push (node:internal/streams/readable:227:10)
    at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)

Should I change something or is a regression bug ?

Thank you

@gawlk gawlk changed the title url as path in the resolveId function of a plugin is broken from beta.51 url as path in the resolveId function of a plugin is broken from beta 51 Jan 29, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant