-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Differential builds instructions? #3682
Comments
This isn't implemented yet, #3011 would be closed in that case.
This works for me: <script type="module" src="index.js"></script>
<script type="text/javascript" nomodule src="index.js"></script> |
What do you mean "it works"? What I end up with is both pointing to the same file (index.js) which can't be right. The same file can't both support and not support modules. |
We're saying that the module/nomodule feature isn't done yet? But the target builds are? If that's the case then I apologize for my assumptions. I thought they were the same thing. |
index.html: <script type="module" src="index.js"></script>
<script type="text/javascript" nomodule src="index.js"></script> index.js const x = [1,2,3];
console.log(...x); Running
They are rather intended for library builds ( |
I see. |
<script type="module" src="index.js"></script>
<script nomodule src="index.js"></script> Seems to work as well. Which setup have you tried that didn't work? |
Okay I spotted my mistake. I even wrote it in my initial comment.
Sorry for taking your time. |
π |
β Question
Could we get better docs on how to get differential builds as described in #3011 and https://medium.com/@devongovett/parcel-2-0-0-alpha-1-is-here-8b160c6e3f7e
Using
2.0.0-alpha.2.1
.π¦ Context
Perhaps I'm not understanding the feature well enough but I've been unable to get something as described to work, where script tags with
module
andnomodule
are automatically created based on targets.I can get differential builds working by having two different targets in my
package.json
and runningparcel build src/index.html
but if I have a single<script module src="main.js"></script>
then both will builds will have themodule
attribute.If I have two script tags in my
index.html
, each withmodule
andnomodule
attributes then both builds will have the script tags but thesrc
of both tags will point to the same file.So I don't know how this is supposed to work so that you end up with one version that supports modules and another that doesn't?
The text was updated successfully, but these errors were encountered: