feat: mock mime packages and fix v1 compat

This commit is contained in:
Pooya Parsa 2020-11-13 15:52:02 +01:00
parent 6ff7c7e02e
commit 2ad4a81362

View File

@ -55,6 +55,9 @@ export const getRollupConfig = (config: SLSOptions) => {
// Custom // Custom
aliases.depd = '~runtime/mocks/depd' aliases.depd = '~runtime/mocks/depd'
aliases.http = '~runtime/mocks/http' aliases.http = '~runtime/mocks/http'
aliases['mime-db'] = '~runtime/mocks/mime-db'
aliases['mime/lite'] = require.resolve('mime/lite')
aliases.mime = '~runtime/mocks/mime'
// Builtin (browserify) // Builtin (browserify)
aliases.buffer = require.resolve('buffer/index.js') aliases.buffer = require.resolve('buffer/index.js')