strapi / sdk-plugin

CLI toolkit for developing a Strapi plugin
Other
2 stars 1 forks source link

[bug]: Selecting Typescript "No" still generates the plugin as Typescript #23

Open derrickmehaffy opened 1 month ago

derrickmehaffy commented 1 month ago

What version of @strapi/blocks-react-renderer are you using?

What's Wrong?

When selection the options during plugin generation, selecting "N" to the typescript question is still generates the plugin as typescript:

image

To Reproduce

Run the command and select no on the typescript question

Expected Behaviour

Should generate the plugin as javascript

sanhup commented 4 weeks ago

Similar issues. Also, for example, package.json has a reference to "source": "./admin/src/index.js" while the file is created as .ts. The content is valid js though, so I was able to use the plugin by manually renaming all files to .js.

Then I had another issue after building because inside strapi-server.js there is a reference to /dist/server, but the files reference inside /dist/server/index.js don't exist after building eg const bootstrap = require("./bootstrap"); there is no ./bootstrap inside the build folder. I am not that familiar with buiding js vs ts so this might be expected. Nevertheless it works if I change strapi-server.js content to module.exports = require('./server/src');. This probably not the way to go, i realize.