fix: add hack for encoding

This commit is contained in:
Pooya Parsa 2020-11-14 01:49:37 +01:00
parent 04bb2fa906
commit 536155825b

View File

@ -138,6 +138,15 @@ export const getRollupConfig = (config: SLSOptions) => {
}
}))
// https://github.com/rollup/plugins/tree/master/packages/replace
// TODO: better fix for node-fetch issue
options.plugins.push(replace({
delimiters: ['', ''],
values: {
'require(\'encoding\')': '{}'
}
}))
// Provide serverMiddleware
const getImportId = p => '_' + hasha(p).substr(0, 6)
options.plugins.push(virtual({