[Solved] Vue uses webpack to package error: Createapp is not a function

Error message

_node_modules_vue_dist_vue_global_ js__WEBPACK_IMPORTED_MODULE_1___ default().createApp   is   not   a   function

There is a problem with the way Vue is introduced

The correct introduction method is

import { createApp } from 'vue';

var App = {
	data() {
		return {
			images: [{
					Picture: "img"
				},
				{
					Picture: "img2"
				}
			],
		}
	}
}
const app = createApp(App); // 将数据添加到Vue数据绑定上
const vm = app.mount("#app"); // 将数据绑定到指定id上

Read More: