Skip to content

Commit a4e0bb0

Browse files
committed
use PLATFORM as condition
1 parent d05ba89 commit a4e0bb0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const mpvueVendorPlugin = require('webpack-mpvue-vendor-plugin')
1515
},
1616
plugins: [
1717
new mpvueVendorPlugin({
18-
platform: process.argv
18+
platform: process.env.PLATFORM
1919
})
2020
]
2121
};

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function mpvueVendorPlugin(options) {
2222
}
2323

2424
mpvueVendorPlugin.prototype.apply = function(compiler) {
25-
const isAlipay = this.options.platform && this.options.platform.includes('my');
25+
const isAlipay = this.options.platform && this.options.platform === 'my';
2626
if (isAlipay) {
2727
compiler.plugin("emit", (compilation, callback) => {
2828
const regExp = /\.js$/;

0 commit comments

Comments
 (0)