arnoson / kirby-vite-multi-page-kit

A multi-page Kirby CMS + Vite starter kit
MIT License
37 stars 6 forks source link

`index.css` is not a manifest entry. #17

Closed Messa1 closed 1 month ago

Messa1 commented 1 month ago

When I do a npm run build via github workflow. It builds everything as it should but after checkin on the server i got this error. index.css is not a manifest entry.

As I saw you change some part in the vite.config.js. On an older project you have this part

  build: {
    outDir: resolve(process.cwd(), 'public/dist'),
    emptyOutDir: true,
    rollupOptions: { input: resolve(process.cwd(), 'src/index.js') }
  },

and now you change it to.

const input = globSync(["src/index.{js,css}", "src/templates/*.{js,css}"]).map(
  (path) => resolve(process.cwd(), path)
);

  build: {
    outDir: resolve(process.cwd(), "public/dist"),
    emptyOutDir: true,
    rollupOptions: { input },
  },

I alrey checked if glob is installed Bildschirmfoto 2024-09-09 um 11 02 49

I know - I could go back to old code base. Maybe you have any idea - what is wrong bevore I go to deep in 😄

Messa1 commented 1 month ago

Ah oky i missed that index.css file in the src folder :) So now it works.