-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
I've been unable to get extendscriptr to run in tandem with module-alias. My application is just the boilerplate, and I'd like to add module-alias so that I can better manage require paths as the application scales. Open to suggestions if I'm headed down an odd path or if this is the wrong communication channel. Thanks for taking the time.
app.js
// this errors when the jsx is run
require('module-alias/register')
$.writeln("@test")
// this runs, but "@test2" will be printed rather than "test2", suggesting moduleAlias didn't do its thing
const moduleAlias = require('module-alias')
moduleAlias.addAlias("@test2", "test2")
$.writeln("@test2")
package.json
{
"scripts": {
"setup": "mkdir dist ; touch dist/app.jsx",
"build": "extendscriptr --script ./src/app.js --output ./dist/app.jsx"
},
"devDependencies": {
"extendscriptr": "^1.2.6"
},
"dependencies": {
"module-alias": "^2.2.2"
},
"_moduleAliases": {
"@test": "test"
}
}
ralts00
Metadata
Metadata
Assignees
Labels
No labels