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

🐛 Should be able to use dynamic href in anchor tag and dynamic Src in iFrame #371

Closed
samithaf opened this issue Dec 21, 2017 · 6 comments

Comments

@samithaf
Copy link

Choose one: is this a 🐛 bug report

🎛 Configuration (.babelrc, package.json, cli command)

{
  "presets": ["es2015"],
  "env": {
    "test": {
      "plugins": [
        ["istanbul", {
          "exclude": [
            "spec.bundle.js",
            "src/**/*.spec.js"
          ]
        }]
      ]
    }
  }
}

🤔 Expected Behavior

Should not throw an error when tag src or tag is dynamic

E.g
<iframe src="{{$ctrl.iframeUrl}}" id="{{$ctrl.iframeId}}" ></iframe>

😯 Current Behavior

Throwing a run time error

💁 Possible Solution

This is a blocker for me to tryout parcel in my current app :(

🔦 Context

N/A

🌍 Your Environment

Software Version(s)
Parcel 1.2.1
Node 8.9.3
npm/Yarn Yarn
Operating System Mac OSx
@samithaf samithaf changed the title Should be able to use dynamic href in anchor tag and dynamic Src in iFrame 🐛 Should be able to use dynamic href in anchor tag and dynamic Src in iFrame Dec 22, 2017
@brandon93s
Copy link
Contributor

Do you mind providing more details about your application? Looks like perhaps an Angular app?

@samithaf
Copy link
Author

Hi. Should have mentioned that. It is a Angular 1.5 application. I am keen to do a benchmark with webpack since it is fairly big app with more than 100k LOC. But stuck with this issue and unable to load sass from node modules. Cheers.

@devongovett
Copy link
Member

What is the error you are getting?

@samithaf
Copy link
Author

samithaf commented Jan 7, 2018

@devongovett sorry for the late response since I was on for vacation could not get back to you before. This is the error I am getting when the href is dynamic.

Mark up

<a href="{{document.path}}" target="_blank" aria-label="{{::(document.title || document.name)}}">{{::(document.title || document.name)}}</a>

Error

<PATH TO FILE>: Cannot resolve dependency './{{document.path}}'
    at /<PROJECT PATH>/node_modules/browser-resolve/node_modules/resolve/lib/async.js:55:21

@edmorley
Copy link

#1153 is a dupe of this, though there is a bit more information there, so perhaps worth forward-duping?

@samithaf
Copy link
Author

Yes. It's a duplicate. Please do fwd dup.

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

4 participants