Comments (3)
from run-applescript.
Thanks for the info here, but I am not yet able to get things to work. I have reviewed the resource you referenced, as well as the extended discussion about esm and Electron here. But there are some things about how esm works that I must be missing (I have not previously been familiar with the import / esm issue in electron).
I downloaded the esm package ($ npm i esm
), and then brought it into my main.js per their docs:
require = require("esm")(module/*, options*/)
module.exports = require("./main.js")
But, still importing run-applescript in either my main js or renderer after bringing in esm, doesn't work. I've tried both:
import { runAppleScriptAsync } from './node_modules/run-applescript';
and
const runAppleScriptAsync = require('run-applescript')
I see that another option is using webpack, but I would prefer to avoid significant changes to my structure (which does not use webpack).
is there another way to use this package with esm
?
from run-applescript.
Hi There. Still trying to find a way to use this with electron, but not having success yet. Trying to get this to work with ESM is currently a no-go it seems. And I'm not able to use webpack.
So, that leaves using a prior version that would allow a require statement.
From what I can tell, the last commit that would allow that would be this one from Jan 2021: https://github.com/sindresorhus/run-applescript/tree/dd9465af64f36e7775180997a20af0671ace43cd
Do you think that is acceptable for production for current version (12+) electron?
from run-applescript.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from run-applescript.