tree: fdd12241d98cb5194924d51781ec63a3d8d2255d [path history] [tgz]
  1. README.md
  2. build/
  3. config/
  4. package.json
  5. webpack.config.js
examples/single-vue-to-js-example/README.md

This example is a template using webpack and weexLoader to convert single vue file to js file.

If you want to convert vue file to js file, please follow the below steps.

Usage

  1. execute npm install in terminal

  2. copy the vue file to current directory

  3. update the content of webpack.config.js

    entry: {
        '<output-filename-without-js-extension>': '<input-file-path-with-filename>?entry=true' 
      },
      output: {
        path: path.resolve(__dirname, '<output-path>')
    }
    

    for example, the below config convert App.vue to e2e-landing.js in current directory.

    entry: {
     	// you should keep ?entry=true and you should give ./
    	'e2e-landing': './App.vue?entry=true'
    },
    output: {
    	path: path.resolve(__dirname, './')
    }
    
  4. execute npm run build:weex in terminal.

  5. Done!

The output file is what you wanted.