0

I am using React 18 with create-react-app template and redux-toolkit. I want to deploy a public shareable Url

something like this https://www.someserverurl.com/CWidget.js

I just want one shareable Js File including sass/css file.

I tried to make a deployment through npm run build but it create a lot of js, css, json and image files which I don't want.

I want to use Parcel or webpack and gulp.

Can I create a deployment as I mentioned above? I just need a single Js file after the deployment.

I want to use it through simple plain html with javascript. I can simple html page can invoke my widget.

James Z
  • 12,209
  • 10
  • 24
  • 44
maifs
  • 1,061
  • 6
  • 15
  • 31

1 Answers1

1

What I think you are looking for is the public folder.

Everything in the public/ folder is statically served. No matter if it's JS/HTML/CSS or something else.

Throvn
  • 795
  • 7
  • 19
  • I just want a single physical js file which can be invoked through html and javascript. I couldnt understand what did you say ? I dont need multiple file , i just need a single js file after the deployment of my react 18 app. – maifs Jun 03 '22 at 08:04