Commit 19e3c9a 1 parent 5684fcd commit 19e3c9a Copy full SHA for 19e3c9a
File tree 1 file changed +3
-1
lines changed
packages/vite/src/node/server/middlewares
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -127,6 +127,7 @@ const processNodeUrl = (
127
127
htmlPath : string ,
128
128
originalUrl ?: string ,
129
129
server ?: ViteDevServer ,
130
+ isClassicScriptLink ?: boolean ,
130
131
) : string => {
131
132
// prefix with base (dev only, base is never relative)
132
133
const replacer = ( url : string ) => {
@@ -155,7 +156,7 @@ const processNodeUrl = (
155
156
url = path . posix . join ( config . base , url )
156
157
}
157
158
158
- if ( server && shouldPreTransform ( url , config ) ) {
159
+ if ( server && ! isClassicScriptLink && shouldPreTransform ( url , config ) ) {
159
160
let preTransformUrl : string | undefined
160
161
if ( url [ 0 ] === '/' && url [ 1 ] !== '/' ) {
161
162
preTransformUrl = url
@@ -271,6 +272,7 @@ const devHtmlHook: IndexHtmlTransformHook = async (
271
272
htmlPath ,
272
273
originalUrl ,
273
274
server ,
275
+ ! isModule ,
274
276
)
275
277
if ( processedUrl !== src . value ) {
276
278
overwriteAttrValue ( s , sourceCodeLocation ! , processedUrl )
You can’t perform that action at this time.
0 commit comments