Skip to content

Commit

Permalink
fix(mp-plugin): 小程序插件 main.js 文件中导出的函数位置调整
Browse files Browse the repository at this point in the history
  • Loading branch information
StrivingRabbit committed Mar 14, 2022
1 parent 5fa1c60 commit 456d235
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/webpack-uni-mp-loader/lib/plugin/index-new.js
Expand Up @@ -81,7 +81,7 @@ function addMPPluginRequire (compilation) {
const filePath = normalizePath(path.resolve(process.env.UNI_INPUT_DIR, name))
const uniModuleId = modules.find(module => module.resource && normalizePath(module.resource) === filePath).id

const source = orignalSource + `\nmodule.exports = ${globalEnv}.__webpack_require_UNI_MP_PLUGIN__('${uniModuleId}');\n`
const source = orignalSource + `\nmodule.exports = ${globalEnv}.__webpack_require_UNI_MP_PLUGIN__('${uniModuleId}');\n`;

compilation.assets[name] = {
size () {
Expand Down

0 comments on commit 456d235

Please sign in to comment.