weexteam / vue-loader-for-apache-weex

vue-loader-for-apache-weex is a third party plugin, and is not developed nor maintained by Apache Weex.
MIT License
30 stars 27 forks source link

support other script loaders #18

Closed zaaksam closed 6 years ago

zaaksam commented 6 years ago

I like to use typescript, so my webpack config like this:

resolve: {
    extensions: ['.ts', '.js', '.vue']
},
module: {
    rules: [
        {
            test: /\.ts$/,
            loader: 'ts-loader', 
            exclude: /node_modules/,
            options: {
                appendTsSuffixTo: [/\.vue$/]
            }
        },
        {
            test: /\.vue$/,
            loader: 'weex-loader'
        }
    ]
},
externals: {
    vue: 'Vue'
},
plugins: [
    new webpack.BannerPlugin({
        banner: '// { "framework": "Vue" } \n',
        raw: true,
        exclude: 'Vue'
    })
]
erha19 commented 6 years ago

@zaaksam You could not just add '!' + lang + '-loader' to .the loader, because some differences lang scripts may use the same loader, like sass and scss (the script is the same). You can refer to this pr to make some changes.Thanks