I am using vue-pdf along with vue-server-renderer. While browsing the page internally, it works fine but on reload, webpack is unable to read .vue file in vue-pdf module.
vue-pdf/src/vuePdfNoSss.vue:1 (function (exports, require, module, __filename, __dirname) { <style src="./annotationLayer.css"></style> ^ SyntaxError: Unexpected token < at createScript (vm.js:80:10) at Object.runInThisContext (vm.js:139:10) at Module._compile (module.js:599:28) at Object.Module._extensions..js (module.js:646:10) at Module.load (module.js:554:32) at tryModuleLoad (module.js:497:12) at Function.Module._load (module.js:489:3) at Function._load (/Users/aditya/rentomojo/node_module Webpack config
rules: [ { test: /\.vue$/, loader: 'vue-loader', }, { test: /\.js$/, loader: 'babel-loader', exclude: /node_modules/, }, EDIT:
Steps to reproduce:
- Clone the repo.
- npm install --save vue-pdf
- Include it in any component.
- Directly navigate to the route and it throws the error.