Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

409
Visualizações
Snowpack 3.8 cannot find the source folder, running dev server with different root directory

I have a project structure like this:

enter image description here

When starting the dev server from root directory everything works perfectly. I would like my index.html file to be in the src directory, but then snowpack does not find the index.html file. When starting the snowpack dev server from inside the src directory it says it can not find the package.json file which is required.

Is there a possibility to start the snowpack dev server from my projects directory, but point to src as the root directory to be served?

I have tried the following configurations in snowpack.config.js

export default {
  root: "./src/index.html",
  mount: {
    src: "/src",
    public: "/",
  },
};
export default {
  mount: {
    public: { url: '/', static: true },
    src: { url: '/src' },
  },
};
export default {
  mount: {
    public: '/',
    src: '/src',
  },
};
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

If someone swing by having a similar problem, this link might help:

frontend build config generator

The generator created the following snowpack.config:

{
  "mount": {
    "dist": "/",
    "src": "/"
  }
}

After applying this configuration, Snowpack should work as requested.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda