In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This issue of the content of the editor will bring you about how to avoid Laravel Mix compilation Vue trample, the article is rich in content and professional analysis and description for you, after reading this article, I hope you can get something.
Laravel Mix compiled Vue crater record
Environment:
/ / package "laravel-mix": "^ 6.0.6", / / composer "laravel/framework": "^ 8.54" node version v15.14.0npm version 7.7.6
First of all, npm needs to install dependent vue, vue-loader, and vue-template-compiler.
Then open the webpack.mix.js file
/ / modify mix.js ('resources/js/app.js',' public/js') / / to mix.js ('resources/js/app.js',' public/js') .vue ()
Open / resources/js/app.js
Import Vue from 'vue' / / must introduce vue require ('. / bootstrap'); Vue.component ('welcome-component', require ('. / components/WelcomeComponent.vue') .default); / / add .default after the component or it will report an error const app = new Vue ({el:'# app'})
For instructions on .default, see https://github.com/vuejs/vue-loader/releases/tag/v13.0.0 here.
Npm run dev
That's about it. There are some changes after using Laravel-Mix 6, which are recorded here.
The above is the editor for you to share how to avoid Laravel Mix compilation Vue trample, if you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.