Paciolan / remote-module-loader

Loads a CommonJS module from a remote URL for the Browser or Node.js.
MIT License
85 stars 21 forks source link

ssr状态下,会出现依赖(dependencies配置)找不到的情况 #24

Open NoeyNoi opened 2 years ago

NoeyNoi commented 2 years ago

import createLoadRemoteModule, { createRequires } from '@paciolan/remote-module-loader'

const dependencies = { vue: require('vue') }

const requires = createRequires(dependencies) export default createLoadRemoteModule({ requires })

使用时: ReferenceError: e is not defined, 原因是vue依赖未加载