Where the javascript is compiled using “pub serve”? (how to package all artifacts of a dart web application ?)
Question
By default "pub serve" command, compile dart code to javascript code and serve it through http. Where those javascript files are compiled ?
My real goal is to package easily all artifacts (.dart,.js, assets) of a dart web application to be able to deploy theme through another server (e.i. httpd apache).
(i'm using pub 1.5.3)
Solution
pub serve
calls the $dart2js
transformer internally.
If you need the output for deployment you use pub build
instead of pub serve
.
pub build
creates a build/web
output directory ready to use for deployment.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow