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.
execute npm install
in terminal
copy the vue file to current directory
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, './') }
execute npm run build:weex
in terminal.
Done!
The output file is what you wanted.