New version design
Closed this issue · 2 comments
Jinjiang commented
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>
: useweex-template-compiler
-
<style>
: useweex-styler
-
<script>
: convertrequire('@weex-module/xxx')
features
- no
isServer
- no
cssModules
- no
CssSourceMap
- no
isScoped
default
-
defaultLoaders
-
lib/template-compiler
- no
image[src]
conversion
- no
-
disabled temporarily
- no hot reload (adapt it later)
- no functional render check (re-support it later)
new option
- entry point config
Hanks10100 commented
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).
Jinjiang commented
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.