Move bundle for ivm to server
This commit is contained in:
parent
62994c2026
commit
f28417a776
|
@ -7,11 +7,11 @@ module.exports = {
|
|||
|
||||
if (
|
||||
/^@budibase\/[^/]+\/.*$/.test(importPath) &&
|
||||
importPath !== "@budibase/backend-core/tests"
|
||||
!["@budibase/backend-core/tests","@budibase/string-templates/js-helpers"].includes(importPath)
|
||||
) {
|
||||
context.report({
|
||||
node,
|
||||
message: `Importing from @budibase is not allowed, except for @budibase/backend-core/tests.`,
|
||||
message: `Importing from @budibase is not allowed, except for @budibase/backend-core/tests and @budibase/string-templates/js-helpers.`,
|
||||
})
|
||||
}
|
||||
},
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
import getJsHelperList from '@budibase/string-templates/js-helpers'
|
||||
|
||||
const helpers = getJsHelperList()
|
||||
module.exports = {
|
||||
...helpers,
|
||||
// pointing stripProtocol to a unexisting function to be able to declare it on isolated-vm
|
||||
// @ts-ignore
|
||||
// eslint-disable-next-line no-undef
|
||||
stripProtocol: helpersStripProtocol,
|
||||
}
|
|
@ -12,6 +12,7 @@
|
|||
"import": "./dist/bundle.mjs"
|
||||
},
|
||||
"./package.json": "./package.json",
|
||||
"./js-helpers": "./src/index-helpers.js",
|
||||
"./index-helpers": "./dist/index-helpers.bundled.js",
|
||||
"./test/utils": "./test/utils.js"
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue