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

Relative assets path with multiple entries #7860

Closed
7 tasks done
noobnooc opened this issue Apr 22, 2022 · 1 comment
Closed
7 tasks done

Relative assets path with multiple entries #7860

noobnooc opened this issue Apr 22, 2022 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@noobnooc
Copy link

Describe the bug

I am building an embedded multiple entries project, it has a config file like this:

  {
    root: "src/pages",
    base: "./",
    build: {
      outDir: "../../build/pages",
      emptyOutDir: true,
      rollupOptions: {
        input: {
          page1: resolve(__dirname, "src/pages/page1/index.html"),
          page2: resolve(__dirname, "src/pages/page2/index.html")
        }
      }
    }
  }

But the built files looks a little strange, the html files are not reference to the asset files correctly. I attempted to change the base field to ../, but nothing is changed.

Reproduction

https://codesandbox.io/s/recursing-orla-m6p97e?file=/build/pages/page1/index.html:281-287

System Info

System:
    OS: macOS 12.3.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 137.45 MB / 32.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 17.1.0 - /usr/local/bin/node
    Yarn: 1.22.17 - /usr/local/bin/yarn
    npm: 8.3.0 - /usr/local/bin/npm
  Browsers:
    Chrome: 100.0.4896.127
    Firefox: 99.0
    Safari: 15.4

Used Package Manager

yarn

Logs

No response

Validations

@sapphi-red
Copy link
Member

duplicate of #4517

@sapphi-red sapphi-red added duplicate This issue or pull request already exists and removed pending triage labels Apr 22, 2022
@github-actions github-actions bot locked and limited conversation to collaborators May 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants