Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web page works in mypackage/build/web but not when web is copied elsewhere #16728

Closed
DartBot opened this issue Feb 11, 2014 · 3 comments
Closed
Labels
closed-duplicate Closed in favor of an existing report

Comments

@DartBot
Copy link

DartBot commented Feb 11, 2014

This issue was originally filed by @zoechi


What steps will reproduce the problem?
1.
I have an AngularApp with some HMTL and CSS files in the lib directory
2.
I run pub build and open the page in Chrome using http://127.0.0.1:3030/mypackage_demo/build/web/index.html
and the page runs fine.
3.
When I then copy mypackage_demo/build/web to mypackage_demo_gh_pages/build and open
http://127.0.0.1:3030/mypackage_demo_gh_pages/build/index.html
None of the asset files (HTML, CSS) from lib directory can be loaded.

(mypackage_demo_gh_pages is also opened like a package in the files view of DartEditor)

I investigated the problem and found

  • pub build doesn't copy assets like HTML and CSS files from the lib (or the dependency packages/mypackage) directory to the build output directory.
  • the web server integrated in DartEditor obviously still serves these files from packages directory outside of the build/web directory.

What is the expected output? What do you see instead?

  • pub build should copy asset files from lib/* to build/web/* (AFAIK this is planned)
  • When I open a page from build/web it should behave like it was deployed - no magic from the web server to resolve files from somewhere else should happen in this case.

What version of the product are you using? On what operating system?
Dart VM version: 1.2.0-dev.4.0 (Fri Feb 7 10:21:55 2014) on "linux_x64"

Please provide any additional information below.
mypackage_demo imports mypackage which has also asset files in lib which are also not copied to the build/web output directory.

@dgrove
Copy link
Contributor

dgrove commented Feb 12, 2014

Both of the expected results are coming.


Added Area-Pub, Triaged labels.

@nex3
Copy link
Member

nex3 commented Feb 12, 2014

pub build should copy asset files from lib/* to build/web/* (AFAIK this is planned)

This is issue #16642, which has been fixed.

When I open a page from build/web it should behave like it was deployed - no magic from the web server to resolve files from somewhere else should happen in this case.

If you're using the editor's server, this will be fixed when it migrates to use "pub serve", which is issue #13591.


Added Pub-Build, Duplicate labels.
Marked as being merged into #13591.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

This issue has been moved to dart-lang/pub#858.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-duplicate Closed in favor of an existing report
Projects
None yet
Development

No branches or pull requests

4 participants