Webpack package vuejs

topic description

A newcomer"s front end has just finished a demo that needs to be packaged and launched with webpack. Js,html,css and pictures are all packed, but vue really can"t be packed.

sources of topics and their own ideas

does not end with .vue code using .js code written by v-for, so I didn"t expect to package it with vue-cli at that time. Is there any way to package vuejs with webpack?

related codes

/ / Please paste the code text below (do not replace the code with pictures)
var vm = new Vue ({

el : "-sharpmainContentBox",
data : {
    pageSize : "",
    artList : [],
    curPage : 1,
    pageCount : 5,
    artInfoList:[],
    artImgList:[],
    account:"",
    owner:"",
    id:"",
    order_id:"",
    offerList:[],
},

what result do you expect? What is the error message actually seen?

an error is reported after running.

webpack

webpack.config.js

May.12,2021

just package the JS file directly in the cli environment. If the packaging error occurs, it should be that the webpack path is misconfigured


data is a method, not an object. If you write vue in this way, you will report an error when compiling. Why not package


it seems that the local dev should have reported an error

Menu