Is it possible to import a full VueJS project with a single line of <script> with webpack?

Hi all.
I’m working on a VueJS app which I want to be portable: end-users will just need to put a minimum script into their websites.

Such as: and a div#wonderfullApp to render VueJS where they want.

I’m using Webpack to build this project which builds some files with a token in development.
Can Webpack build a single file to achieve what I want? or do I need to search for another solution?


Hi. You have to configure webpack to not split your app into app.js and chunk-vendors.js. Usually you want this split because the vendor usually change more seldom so users can use the cached version of it and just download app.js if you make changes to it.

I think you can put this in the vue.config.js file at the root of the project and it will produce only one file

module.exports = {  
  plugins: [
    new webpack.optimize.LimitChunkCountPlugin({
      maxChunks: 1,