diff --git a/packages/webpack-uni-mp-loader/lib/plugin/index-new.js b/packages/webpack-uni-mp-loader/lib/plugin/index-new.js index fdbcb3490df85dfc43f3261f2a12805e5c4e55a2..928739801ee6851a78263ac7ff5ed768ad7c3560 100644 --- a/packages/webpack-uni-mp-loader/lib/plugin/index-new.js +++ b/packages/webpack-uni-mp-loader/lib/plugin/index-new.js @@ -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 () {