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

dev-bundle-dest dont work #1197

Closed
1 task done
pYr0x opened this issue May 10, 2017 · 6 comments
Closed
1 task done

dev-bundle-dest dont work #1197

pYr0x opened this issue May 10, 2017 · 6 comments

Comments

@pYr0x
Copy link
Collaborator

pYr0x commented May 10, 2017

How often can you reproduce it?

  • Always

Description:
i want to use the dev-bundle feature.
i have a bundle.js

const stealTools = require("/home/vagrant/.nvm/versions/node/v6.9.4/lib/node_modules/steal-tools");
const path = require("path");

const promise = stealTools.bundle({
  main: "triwala-vk/web/main",
  config: path.join(__dirname, "package.json!npm")
}, {
  dest: path.join(__dirname, "frontend", "resources", "compiled", "js"),
  filter: ["node_modules/**/*", "package.json"]
});

in my html file i called:
<script src="/triwala/vk/node_modules/steal/steal.js" dev-bundle="" dev-bundle-dest="/triwala/vk/resources/compiled/js/" main="triwala-vk/web/probenuntersuchungen/index"></script>

but i get an error:
GET http://localhost/triwala/vk/dev-bundle.js 404 (Not Found)
but the dev-bundle.js is located under /triwala/vk/resources/compiled/js/dev-bundle.js

Environment:

Software Version
Steal version latest
Steal-tools version latest
node -v 6.9.4
npm -v 3.10
Browser chrome
Operating system windows / linux
@pYr0x
Copy link
Collaborator Author

pYr0x commented May 13, 2017

@m-mujica , @matthewp any idea want's wrong?

@matthewp
Copy link
Member

Not yet, can probably take a look next week. However I don't think there's a dev-bundle-dest option in the attributes. I think you just do dev-bundle="/triwala/vk/resources/compiled/js/" instead...

@matthewp
Copy link
Member

It shouldn't be the full path though, it should be a module identifier so triwala/vk/resources/compiled/js/ probably.

@m-mujica
Copy link
Contributor

m-mujica commented May 14, 2017

@pYr0x Matt is right, we use a single property

<script src="/triwala/vk/node_modules/steal/steal.js" 
        dev-bundle="triwala/vk/resources/compiled/js/dev-bundle"></script?

Also, I'm pretty sure you need to provide the path to the actual file

Please, try this when you have a second and let us know if it works!

@pYr0x
Copy link
Collaborator Author

pYr0x commented May 14, 2017

@m-mujica provide the path to the bundle file worked.
<script src="/triwala/vk/node_modules/steal/steal.js" dev-bundle="resources/compiled/js/dev-bundle" main="triwala-vk/web/probenuntersuchungen/index" config="/triwala/vk/package.json!npm"></script>

however, the stealjs docs are wrong:
https://stealjs.com/docs/steal-tools.bundle.html#dest have a example <script src="./node_modules/steal/steal.js" deps-bundle deps-bundle-dest="my-bundle/"></script>
https://stealjs.com/docs/steal-tools.bundle.html#dependencies-bundle-and-development-bundles <script src="./node_modules/steal/steal.js" dev-bundle dev-bundle-dest="my-dev-bundle/"></script>

@matthewp
Copy link
Member

Hm, I think we flirted with the idea of having that attribute but decided the single one was enough and could serve both purposes. Docs should be updated then.

@m-mujica m-mujica self-assigned this May 15, 2017
m-mujica pushed a commit to stealjs/steal-tools that referenced this issue May 15, 2017
Remove references to `deps-bundle-dest` and `dev-bundle-dest`; the
attributes `dev-bundle` and `deps-bundle` can be passed a string to the
path where the dev-bundle module is located.

Close stealjs/steal#1197
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants