File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
packages/core/src/code-evaluation Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 11import path from 'path'
2+ import url from 'url'
23import { createRequire } from 'module'
34
45import { toArray } from '@jscad/array-utils'
@@ -36,7 +37,8 @@ export const rebuildGeometryCli = async (data) => {
3637 // rootModule should contain exported main and getParameterDefinitions functions
3738 // const rootModule = requireDesignFromModule(mainPath, requireFn)
3839 // FIXME HACK for designs with import / export
39- const rootModule = await import ( mainPath )
40+ const mainURL = String ( url . pathToFileURL ( mainPath ) )
41+ const rootModule = await import ( mainURL )
4042
4143 // the design (module tree) has been loaded at this stage
4244 // now we can get our usefull data (definitions and values/defaults)
You can’t perform that action at this time.
0 commit comments