When vue components (`.vue`) are imported inside a server side bundle, `vue-loader` tries to add the webpack hot module replacement code when building. https://github.com/vuejs/vue-loader/blob/635560f27a54b86e6c20f0a880e873a366f8bfbd/lib/template-compiler.js#L47 I think it can be fixed by checking if `this.target !== 'node'`. A bit like here: https://github.com/vuejs/vue-loader/blob/635560f27a54b86e6c20f0a880e873a366f8bfbd/lib/loader.js#L194