title: Prevent JS files from splitting into chunks (vue cli 4 + webpack)
body: <pre><code>npm run build
  </code></pre>
  
  <p>Is creating multiple 'chunk' files, such as:</p>
  
  <ol>
  <li>/dist/js/app.*.js</li>
  <li>/dist/js/chunk-2413.js</li>
  <li>/dist/js/chunk-5133.js</li>
  </ol>
  
  <p>My goal is to have them all within a single app.*.js file!</p>
  
  <p>I've set 'splitChunks' to false in vue.config.js, however this won't put all the chunks in the same app.*.js file, since I'm importing a bunch of text files into the project (I'm opting for text files over internal configuration variables as I prefer this format for the purpose of the application).</p>
  
  <p>Here's my code that successfully returns promises and loads the data from the text files into the allContents array:</p>
  
  <pre><code>const textFiles = require.context('../assets/textfiles', true, /\.txt$/i);
  var self = this;    
  var fileContents = textFiles .keys();
  fileContents.forEach(function (item, index){
      console.log(item+' - '+index);
      var val = import('raw-loader!../assets/textFiles '+item.replace('.',''));
      val.then( (resp) =&gt; {
          console.log(resp.default);
          self.allContents.push(resp.default);
      });
  });
  </code></pre>
  
  <p>The data from these text files, is causing the 'dist/js/chunk...' files to be created. What I need to is stop them from doing that - but how? Is there a way to stop this behaviour?</p>
  
  <p><strong>Update to include vue.config.js:</strong></p>
  
  <pre><code>const ScriptExtHtmlWebpackPlugin = require('script-ext-html-webpack-plugin')
  
  module.exports = {
      publicPath: '',
      productionSourceMap: false,
      css: {
          extract: false,
      },
      configureWebpack: {
          optimization: {
              splitChunks: false
          },
          plugins: [
              new ScriptExtHtmlWebpackPlugin({
                  preload: /\.js$/,
                  defaultAttribute: 'async'
              })
          ]       
      },
      chainWebpack: config =&gt; {
          config.module
            .rule('raw')
            .test(/\.txt$/)
            .use('raw-loader')
            .loader('raw-loader')
            .end()
    }
  }
  </code></pre>
  
  <p><strong>Sample data from one of the chunk js files:</strong>
  <em>(it's just loading in a txt file which has contents like '### Config: ### blah blah')</em></p>
  
  <pre><code>(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0a2dc4"],{"005c":function(e,t,n){"use strict";n.r(t),t["default"]="export default \"##########\\r\\n# Config:\\r\\n##########\\r\\n\\r\\n$type: Chat\";"}}]);
  </code></pre>