Skip to content

feat: Support uri fragment in transformed require #49

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

Closed
wants to merge 3 commits into from
Closed

feat: Support uri fragment in transformed require #49

wants to merge 3 commits into from

Conversation

joma74
Copy link

@joma74 joma74 commented Apr 24, 2018

Hello katashin,

My case for this PR is a svg within a html based vue component, where i deployed vue-template-loader for this usage. In this html i put a svg element as in

<svg>
    <use href="~@svg/menu.svg#menu"></use>
</svg>

After banging my head over webpack's Module not found: Error i found out that this case may be covered by vue-template-loader, which is the purpose of this PR. Root cause is that the whole href is generated by vue-template-loader and as-is is required by webpack; this must fail because the whole href - including the uri fragment #menu - is not part of any mapped physical file location of such an svg.

Kindly request you to consider this PR; If the PR does not meet your accepted standards, after your feedback i would alternatively like to bring that in as a seperate feature request issue.

@ktsn
Copy link
Owner

ktsn commented Jun 14, 2018

Thanks for your contribution. Would you mind making PR to vuejs/component-compiler-utils instead because vue-template-loader now completely rely on it in terms of asset transformation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants