AdobeDocs / uxp-indesign-samples

MIT License
16 stars 9 forks source link

React-Starter doesn't allow 'indesign' to be imported #3

Open arthur5005 opened 1 year ago

arthur5005 commented 1 year ago

Tried using the react-starter template to build out a plugin. Was building out an interface, then tried to import indesign using:

const { app } = require("indesign");

in one of my component files

Got: Cannot find module 'indesign' as an error.

Am able to import uxp no problem.

requiring indesign in a regular starter kit was no problem. Is there something I'm missing?

arthur5005 commented 1 year ago

So I've tracked the issue down to the InDesign react-starter that spins up in Adobe UXP Developer Tool.

At first glance, it looks like the same as what's in this repository, but the word indesign has been title cased in the webpack config on generation, when using the Developer Tool.

Screenshot 2023-08-08 at 10 09 04 PM Screenshot 2023-08-08 at 10 03 34 PM

Not sure where to submit this issue, I would have opened a PR here, but it's definitely correct in the repository, it's something the Developer Tool is doing on generation.

padmkris123 commented 1 year ago

@arthur5005 Thanks for bringing this to our notice. For the time being pls use the react-starter from this repo. We will fix this in UDT.