title: Use worker-loader with vue-cli and webpack
body: <p>Im trying to setup worker-loader with vue-cli webpack installation that provides the following file structure for build / configuration:</p>
  
  <pre><code>-build
  --vue-loader.conf.js
  --webpack.base.conf.js
  --other build files...
  -config
  --index.js
  --dev.env.js
  --other config files...
  </code></pre>
  
  <p>I then installed worker-loader with</p>
  
  <pre><code>npm install worker-loader --save-dev
  </code></pre>
  
  <p>So then I tried require my worker.js with</p>
  
  <pre><code>require('worker-loader!my-worker.js');
  </code></pre>
  
  <p>But its not loaded by babel which is used as default for vue-cli webpack version</p>
  
  <p>So then I tried update webpack.base.conf.js with the following configuration:</p>
  
  <pre><code>module: {
  rules: [
    {
      test: /\.(js|vue)$/,
      loader: 'eslint-loader',
      enforce: 'pre',
      include: [resolve('src'), resolve('test')],
      options: {
        formatter: require('eslint-friendly-formatter')
      }
    },
    {
      test: /\.vue$/,
      loader: 'vue-loader',
      options: vueLoaderConfig
    },
    {
      test: /\.js$/,
      loader: 'babel-loader',
      include: [resolve('src'), resolve('test')]
    },
    {
      test: /\worker\.js$/,
      loader: 'worker-loader',
      include: [resolve('src'), resolve('test')]
    },
    {
      test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
      loader: 'url-loader',
      options: {
        limit: 10000,
        name: utils.assetsPath('img/[name].[hash:7].[ext]')
      }
    },
    {
      test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
      loader: 'url-loader',
      options: {
        limit: 10000,
        name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
      }
    }
  ]
  }
  </code></pre>
  
  <p>But my worker is then only read by babel and imported as a regular js file, and the worker-loader doesnt seam to do anything.</p>
  
  <p>So how to configure this correctly?</p>