make requireDynamic pattern more exact

This commit is contained in:
Pooya Parsa 2020-11-02 14:12:33 +01:00
parent e17b0c5787
commit b03eef0ceb

View File

@ -65,7 +65,7 @@ export const getRollupConfig = (config) => {
options.output.intro += 'const requireDynamic = require;' options.output.intro += 'const requireDynamic = require;'
options.plugins.push(replace({ options.plugins.push(replace({
values: { values: {
'require("./"': 'requireDynamic("./"' 'require("./" +': 'requireDynamic("./" +'
}, },
delimiters: ['', ''] delimiters: ['', '']
})) }))