apache / incubator-weex-loader

Apache License 2.0
65 stars 32 forks source link

关于 jade/pug 的一个疑问 #52

Closed u3u closed 6 years ago

u3u commented 7 years ago

为什么只能使用 jadejade-html-loader? 使用 pugpug-loader 会显示空白?

weex: {
  lang: {
    pug: ['pug'],
    jade: ['pug'],
    stylus: ['stylus?sourceMap'],
  },
},
mdsb100 commented 6 years ago

+1

Hanks10100 commented 6 years ago

Example of using pug: http://dotwe.org/vue/99021166941b8839191cdcf6099ce231

Maybe you can config you webpack.config.js like this (for v2+):


rules: [{
    loader: 'weex-loader',
    options: {
        loaders: {
            scss: ['sass-loader'],
            sass: [{
                loader: 'sass-loader',
                options: { indentedSyntax: true }
            }],
            less: ['less-loader'],
            stylus: ['stylus-loader'],
            styl: ['stylus-loader']
        }
    }
}