Open n3ps opened 6 years ago
I like this idea!
The weex-vue-loader
offers an equivalent function with vue-loader
but only for the Weex platform. To be pecific. it's a webpack loader whick can be used to compile the *.vue
files into *.js
files for Weex platfrom.
Compare to the vue-loader
, it's using different sub-packages to handle each part of *.vue
files. In weex-vue-loader
:
<template>
part will be processed by the weex-template-compiler
package, it'll be converted into a render function of Vue component. The corresponding package within vue-loader
is vue-template-compiler
.<style>
part will finally be processed by the weex-styler
package, it'll be converted into a JSON-like object for Weex platform, which is different with the web.<script>
part is same with the vue-loader
.The weex-loader
is just a wrapper of weex-vue-loader
.
Because this packages was originally designed to supportting all DSL frameworks of Weex. But after practice, we think it may not a good idea to mantain those dsl framework compliers. Now this package is mainly for compiling the *.vue
files, so you can think it as a simple wrapper of weex-vue-loader
.
Actually, besides the
*.vue
file, it can also compile the*.we
files, which is a legacy framework of Weex (It was inspired by Vue 1.0, since Weex support the Vue 2.0 officially, that framework is deprecated).
Is it possible to simplify?
Use the new vue-loader and make this a vue-loader "plugin"?