Environment
Nuxt CLI v3.0.0-27252573.ad7e755 19:54:26
RootDir: /Users/lookis/projects/nuxt3-app 19:54:27
Nuxt project info: 19:54:27
- Operating System:
Darwin
- Node Version:
v14.18.1
- Nuxt Version:
3.0.0-27252573.ad7e755
- Package Manager:
Yarn
- Bundler:
Vite
- User Config:
modules, build, proxy
- Runtime Modules:
@nuxtjs/proxy@2.1.0
- Build Modules:
-
Describe the bug
build.publicPath only affect image file, all css/.mjs file still use relativePath "/_nuxt/"
Reproduction
https://codesandbox.io/s/throbbing-sky-7mmfe
yarn build
yarn start
Additional context
codesandbox may run only under dev mode, i was tried production mode with no luck,
image file got the full path when .mjs/.css still relative path:
<!DOCTYPE html>
<html data-head-attrs="">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="head:count" content="2">
<link rel="modulepreload" href="/_nuxt/entry-0e85cf82.mjs" as="script">
<link rel="modulepreload" href="/_nuxt/index-4a5df546.mjs" as="script">
<link rel="preload" href="/_nuxt/assets/index.045b46d2.css" as="style">
<link rel="prefetch" href="/_nuxt/assets/googlelogo.5776cd87.png">
<link rel="stylesheet" href="/_nuxt/assets/index.045b46d2.css">
</head>
<body data-head-attrs="">
<div id="__nuxt">
<!--[-->
<div><img src="https://static.example.com/assets/googlelogo.5776cd87.png"></div>
<!--]-->
</div>
<script>window.__NUXT__ = (function (a) { return { data: {}, state: {}, serverRendered: true, config: { app: { basePath: a, assetsPath: a, cdnURL: "https:\u002F\u002Fstatic.example.com\u002F" } } } }("\u002F"))</script>
<script type="module" src="/_nuxt/entry-0e85cf82.mjs" defer></script>
<script type="module" src="/_nuxt/index-4a5df546.mjs" defer></script>
</body>
</html>
Logs
No response
Environment
Nuxt CLI v3.0.0-27252573.ad7e755 19:54:26
RootDir: /Users/lookis/projects/nuxt3-app 19:54:27
Nuxt project info: 19:54:27
Darwinv14.18.13.0.0-27252573.ad7e755YarnVitemodules,build,proxy@nuxtjs/proxy@2.1.0-Describe the bug
build.publicPath only affect image file, all css/.mjs file still use relativePath "/_nuxt/"
Reproduction
https://codesandbox.io/s/throbbing-sky-7mmfe
yarn build
yarn start
Additional context
codesandbox may run only under dev mode, i was tried production mode with no luck,
image file got the full path when .mjs/.css still relative path:
Logs
No response