title: Vue - Module build failed (from ./node_modules/vue-loader/lib/loaders/templateLoader.js): SyntaxError: Unexpected token (13:1080)
body: <p>When i try to run &quot;cross-env NODE_ENV=development nodemon ./server.js&quot; i got these error:</p>
  <blockquote>
  <p>ModuleBuildError: Module build failed (from
  ./node_modules/vue-loader/lib/loaders/templateLoader.js):<br />
  SyntaxError: Unexpected token (13:968)</p>
  </blockquote>
  <p>How to fix it. I'm using Vue 2, Webpack 4, and Vue-loader 15.</p>
  <p>i've write configuration on my webpack.config and vue.config like this:</p>
  <pre><code>const { VueLoaderPlugin } = require(&quot;vue-loader&quot;);
  
  module.exports = {
  
    chainWebpack: config =&gt; {
      config.plugins.delete(&quot;prefetch&quot;);
    },
  
    configureWebpack: {
      module: {
        rules: [
          {
            test: /\.vue$/,
            loader: &quot;vue-loader&quot;
          },
          {
            test: /\.js$/,
            loader: &quot;babel-loader&quot;
          },
          {
            test: /\.css$/,
            use: [&quot;vue-style-loader&quot;, &quot;css-loader&quot;]
          }
        ]
      },
      plugins: [new VueLoaderPlugin()],
      resolve: {
        extensions: [&quot;*&quot;, &quot;.js&quot;, &quot;.jsx&quot;, &quot;.vue&quot;, &quot;.ts&quot;, &quot;.tsx&quot;],
        alias: {
          vue$: &quot;vue/dist/vue.runtime.esm.js&quot;
        }
      }
    }
  };
  </code></pre>