vuejs/vue

Cannot load extension with file or directory name _plugin-vue_export-helper.js. Filenames starting with "_" are reserved for use by the system.

Lmangoxx opened this issue · 1 comments

项目背景:谷歌插件开发


问题描述

如果我在任何vue文件里添加

<style scoped> // 样式代码 </style>

vite编译完成后,会自动生成一个_plugin-vue_export-helper.js文件
而谷歌插件对于项目文件名称有限制,_开头的文件无法加载,导致项目无法正常运行

Cannot load extension with file or directory name plugin-vue_export-helper.js. Filenames starting with "" are reserved for use by the system.

我该如何配置vite或者有什么其他办法可以解决这个问题


版本描述

"vue": "^3.3.11",
"vite": "^5.4.11",


vite配置的build选项

build: {
  watch: { include: 'src/**' },
  sourcemap: isDev,
  rollupOptions: {
    input: {
      options: path.resolve(__dirname, './options.html'),
    },
    output: {
      assetFileNames: 'assets/[name][extname]',
      entryFileNames: 'js/[name].js',
      chunkFileNames: '[name].js'
    },
  },
},

Sorry, This problem is @vite/plugin-vue