vite-plugin-vue icon indicating copy to clipboard operation
vite-plugin-vue copied to clipboard

Support for PUG includes

Open silentmantra opened this issue 2 years ago • 1 comments

Description

Promoting Vite on stackoverflow.com but that's hard. I guess Vite loses to Webpack in terms of support and size of community. I think more easy-to-implement features could be added to Vite for closing the gap.

I had recently a hot debate on handling PUG files. https://stackoverflow.com/questions/76565215/vite-not-detecting-changes-vue-pug

Turned out there's no support for PUG includes in VIte and a couple of existing PUG plugins doesn't solve the problem.

Suggested solution

Add support of using include inside <template lang="pug">

Alternative

No response

Additional context

No response

Validations

silentmantra avatar Jul 01 '23 07:07 silentmantra

I got pug includes to work in our projects by specifying the basedir in the vue plugin config like this:

vue({
  template: {
    preprocessOptions: {
      basedir: path.resolve(__dirname, './src') // or something else here
    },
  }
}

rashfael avatar Jul 12 '23 07:07 rashfael