Vue+webpack infrastructure Projects (non-VUE-CLI)

Source: Internet
Author: User

  1. Yarn Add Vue
  2. Yarn Add Webpack
  3. Yarn Add Webpack-cli
  4. Yarn Add Html-webpack-plugin
  5. Yarn Add Webpack-dev-server
  6. Create build, src folder
  7. Create a index.html file
    <!DOCTYPE HTML><HTMLLang= "en"><Head>    <MetaCharSet= "UTF-8">    <title>Vue</title></Head><Body>    <DivID= "App"></Div></Body></HTML>
  8. Create src/index.js file
     import Vue from ' vue ' new   Vue ({el:  ' #app '  return  H (' div ', ' Hello world! ' 
  9. Create Build/webpack.dev.conf.js file
     const Htmlwebpackplugin = require (' html-webpack-plugin '  './dist/main.js '  './src/index.html '  true  // true clip at the end of the file  })], Devserver: {port:  1222 true  //  auto Open browser  }}  
  10. Add scripts to Package.json
  11. Yarn Start Startup Project

GitHub

Vue+webpack infrastructure Projects (non-VUE-CLI)

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.