underfin / vite-plugin-vue2

Vue2 plugin for Vite
621 stars 84 forks source link

Error using rollup-plugin-esbuild #162

Closed dongj0316 closed 2 years ago

dongj0316 commented 2 years ago

vite.config.js

{
  plugins: [
    {
      ...esbuild({
        target: 'chrome70',
        include: /\.(jsx|js|vue)$/,
        loaders: {
          '.vue': 'js',
        },
      }),
      enforce: 'post',
    }
  ]
}

There are compilation errors image The solution is to modify main.ts, at line 110:

// result += `\nexport default /*#__PURE__*/(function () { return __component__.exports })()`
result += `\nexport default (function () { return __component__.exports })()`
underfin commented 2 years ago

See pr said.