Have the confidence to see the official documentsThere is a notable feature of Vue's official documentation---code is not fully pastedVue Chinese Station: cn.vuejs.orgVue-router Official Tutorial: ROUTER.VUEJS.ORG/ZH-CNVuex Official Tutorial: VUEX.VUEJS.ORG/ZH-CNI'll default to your VUE-CLI. You'll have a directory like this.I don't have to explain it here! Get r
] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.html [L]Nginxlocation / { $uri $uri/ /index.html;}node. JS (Express)https://github.com/bripkens/connect-history-api-fallbackAttention:Give a warning, because after doing so, your server will no longer return the 404 error page because the index.html file will be returned for all paths. To avoid this, you should cover all routing conditions in the
" #配置好路径 }, since we are installed in the project, all Wenpack are installed in the bin directory, so first configure the path late call to run the command directly: NPM Run pack Configure Webpack paths in Packjage to reduce code generationSecond:module.exports={entry:{Home:'./next/home.js', #输入口, before the file name, followed by the path signup:'./next/signup.js' }, //filename required for outputoutput:{FileName:'[Name].bundle.js', #[
Today VUE-CLI packing finished found not loaded font awesome; The road and strange, js,css,img are correctly loaded;The first load of static resources correctly requires the Index.js in config to Publicpath: './';and the font awesome hole in the Webpack on the file packaging size restrictions (Here I did not learn webpack
The last blog post tells you how to use routing, this time to talk about how to write a Vue componentVue defines a file with a "single-file component" suffix of '. Vue ' that looks like this:Template> Div> Divv-for= "N in obj": Class= "MSG"@click= "Say (n)">{{n}}Div> Div>Template>Script>Exportdefault{data: ()={ return{msg:'Hello, I'm slag-shining.', obj: {name:'Zhangxiaomie', Age: A}}, methods:{
Webpack vue Project Development Environment LAN access method, webpackvue
Ideas:Set the startup ip address and port of your project. Of course, the port can also be 8080 by default.
Steps:
1. view your own ip address in the LAN
Command Line ipconfig
2. Go back to your Development Directory and find comfig/index. js in the root directory.
Modify host: your l
, when the final development completed on-line when the production version is introduced, the development version is not compressed, and there are manyAnd the production version is all erased.Providing a scaffold (command-line tool) in Vue can help us quickly build a webpack-based development environment ...Example of VueEach application has a root instance, and in the root instance we implement a large app
top 3, view other Vue framework source codeNow look at the beginning of the article HTMLIn conjunction with the Vue component documentation, the above is an encapsulation of the input tag.Of course, the above is only the basis of component, the package of components have to combine a lot of other things, to understand the framework of the source code also need to learn some other knowledge, but at least th
1. Webpack packing compression ES6 js,. Vue Error:ERROR in Js/test.js from uglifyjsunexpected token punc? (?, expected Punc?:?) [js/test.js:1374,5]This problem is usually because JS uses the ES6 notation, UGLIFYJS does not support
By default, through the Webpack+vuec-li packaging of CSS, JS and other resources, the path is absolute, that is, static in the root directory, if deployed to a project with a folder directory, the resource path will be wrong, how to resolve.1. Modify the resource reference relative path to open build/webpack.prod.conf.js27 rows found output: increased publicpath: './',Of course, modify it in the Config fol
Detailed explanation of webpack + vue-cli project packaging skills, webpackvue-cli
1. Set the productionSourceMap value in index. js of the config folder to false, that is, set devtool to false in webpack configuration. After packaging, the file size can be reduced by 80% !!!!!!!
2. How to Implement Version Control
Vue-cli and Element-ui encapsulate vue Based on cropper. js to implement the image cropping component function. vue-clielement-ui
In front-end work, image cropping is often required,cropper.jsIs an excellent front-end plug-in with a wide range of APIs.
This article encapsulates the image cropping plug-in the
Use vue. js to create paging components and vue. js paging Components
I learned vue. js for a while, used it for two small components, and practiced it.I am using webpack for packaging,
var path = require (' path ') Module.exports = {build: {///Production Environment Env:require ('./prod.env '),//Use CONFI The compilation environment defined in G/prod.env.js index:path.resolve (__dirname, '. /dist/index.html '),//Compile the input index.html file assetsRoot:path.resolve (__dirname, '. /dist '),//Compile output static resource path assetssubdirectory: ' Static ',///compile output of level two directory Assetspublicpath: '/',///compile the root of the publication, can be configur
1. Install dependent packages$ NPM Install--save-div babel-preset-es2015PS:babel-loader,babel-core should be installed by default, if not, please reinstall2. Modify the "webpack.config.js" configuration fileFind /\.js$/ the rules and make changes{ test:/\.js$/, use : [{ loader: ' Babel-loader ', options: { presets: [' es2015 '] } }], exclude
1. Create a project (the process of the Vue project is not much to say)2.CNPM Install Vux--save3. In the build/webpack.base.conf.js configuration:Const Vuxloader = require (' Vux-loader ')Put the first module.exports assignment variable let webpackconfig ={inside the code does not move}And this one on the bottom.Module.exports = Vuxloader.merge (webpackconfig, {plugins: [' Vux-ui ', ' progress-bar ', ' Duplicate-style ') ]})4. InstallationVux-loaderUs
First, install the js-sha2561 npm Install js-sha256Js-sha256 appears in the Node_modules folderIi. introduction of JS-SHA256Introducing js-sha256 in the modules that need to be used1 // Introducing the SHA256 libraryThird, SHA256 encryption1 Password = sha256 (' my password ');Four, can also directly use the SHA256 Li
Summary of vue. js and summary of vue. js
This article mainly summarizes the understanding of vue:
Reference Source: http://blog.csdn.net/generon/article/details/72482844
Vue. js is a p
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.