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

Angular2-template-loader does not work with awesome-typescript-loader in my tests #30

Open
gituser7878-Ultralinq opened this issue Sep 22, 2016 · 4 comments

Comments

@gituser7878-Ultralinq
Copy link

gituser7878-Ultralinq commented Sep 22, 2016

EDIT (Nov 1, 2016):
template: require('./myComponent.html') was necessary for me to use with awesome-typescript-loader, which defeated the point since templateURL should be working and converted to in-line on the fly. templateUrl didn't work even with a hardcoded path. However no issues with ts-loader so my problem was solved.

Here is some of my webpack.test.js configuration:

module: {
    loaders: [
        {
            test: /\.ts$/,
            loaders: ['awesome-typescript-loader', 'angular2-template-loader']
        },
        {
            test: /\.html$/,
            loader: 'raw-loader'

        }

]
}

@TheLarkInn
Copy link
Owner

I would accept a PR for having the loader accept an option in the config that doesn't transform the templateUrl, etc.

@gituser7878-Ultralinq
Copy link
Author

Well this did finally work for me with ts-loader. Not awesome-typescript-loader.

@gituser7878-Ultralinq gituser7878-Ultralinq changed the title Angular2-template-loader does not work at all for tests Angular2-template-loader does not work with awesome-typescript-loader in my tests Nov 1, 2016
@yjaaidi
Copy link
Contributor

yjaaidi commented Nov 6, 2016

Hi @TheLarkInn, I just implemented this feature using a keepUrl option and here's the PR: #39

But I'm still not satisfied with it's name :) any better ideas?

Thanks!

@tekix
Copy link

tekix commented Nov 8, 2016

i tried to adjust the loader order like #19 , also works for tests

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

No branches or pull requests

4 participants