weexteam/vue-loader-for-apache-weex

New version design

Closed this issue · 2 comments

The new version is in branch weex-next which is forked from vue-loader. Based on web platform, weex-vue-loader make these changes below:

parts

  • <template>: use weex-template-compiler
  • <style>: use weex-styler
  • <script>: convert require('@weex-module/xxx')

features

  • no isServer
  • no cssModules
  • no CssSourceMap
  • no isScoped

default

  • defaultLoaders
    • lib/template-compiler
      • no image[src] conversion

disabled temporarily

  • no hot reload (adapt it later)
  • no functional render check (re-support it later)

new option

  • entry point config

I have some additional ideas. In the loader, we can also do these:

  • Convert alias tag name.
  • Add lint rules.
  • Support semantic tags. Convert it to the similar (supported) tag with a default style.
  • If we support to write pulgins for weex-template-compiler, developer can write "template syntactic sugar", which can be compiled in loader.
  • Support CSS preprocessors (and postcss).

PostCSS has been supported in this loader. The other jobs can be done in weex-template-compiler or weex-styler instead. And it's possible to work with all packaging tools. The loader is just a connection to webpack.