Open bphenriques opened 1 year ago
Hello!
Trying to tidy up a project so that the usual web resources live within the same subdirectory web:
web
. ├── README.md ├── build.sbt ├── project │ ├── build.properties │ └── plugins.sbt ├── src │ └── main │ └── scala │ └── livechart │ └── LiveChart.scala └── web ├── index.html ├── javascript.svg ├── main.js ├── package-lock.json ├── package.json ├── public │ └── vite.svg ├── style.css └── vite.config.js
I have updated vite.config.js accordingly to point to the parent directory but it then fails to find resources installed node_modules:
vite.config.js
node_modules
Example repo that attempts to reproduce: https://github.com/bphenriques/issue-rd-scalajs-sbt-vite-laminar-chartjs-example/tree/scalajs-vite-end-state (branch scalajs-vite-end-state).
scalajs-vite-end-state
It is built on top of the usual scalajs-vite tutorial: https://www.scala-js.org/doc/tutorial/scalajs-vite.html
Variations:
package.json
package-lock.json
I am likely doing something wrong and this is perhaps intended, in that case, what would be the "standard" structure that resembles what I inded?
$ npm --version 9.5.1
If relevant, MacOS.
Thank you!
Hello!
Trying to tidy up a project so that the usual web resources live within the same subdirectory
web
:I have updated
vite.config.js
accordingly to point to the parent directory but it then fails to find resources installednode_modules
:How to reproduce
Example repo that attempts to reproduce: https://github.com/bphenriques/issue-rd-scalajs-sbt-vite-laminar-chartjs-example/tree/scalajs-vite-end-state (branch
scalajs-vite-end-state
).It is built on top of the usual scalajs-vite tutorial: https://www.scala-js.org/doc/tutorial/scalajs-vite.html
web
(commit):Variations:
package.json
,package-lock.json
, andnode_modules
to the root - does not work.I am likely doing something wrong and this is perhaps intended, in that case, what would be the "standard" structure that resembles what I inded?
Environment:
If relevant, MacOS.
Thank you!