Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Ignore loader chaining #2

Open
ryuran opened this issue Jun 28, 2019 · 5 comments
Open

Ignore loader chaining #2

ryuran opened this issue Jun 28, 2019 · 5 comments
Labels
bug Something isn't working

Comments

@ryuran
Copy link
Contributor

ryuran commented Jun 28, 2019

Hello

https://github.com/nicolasRdr/twing-loader/blob/master/src/loader.js#L15
This line use this.ressource it’s the path of original file and not the result of previous loaders.

We should une sourceData here

module.exports = async function loader(sourceData) {

But I don't know how use it with Twing API.
Maybe @ericmorand can help

@DerekRoth
Copy link
Contributor

yes this is indeed a quick and imperfect Twing loader implementation. Using the result of previous loaders is apparently more complicated than it seems because of the fact that Twig requires file names for many features. If you can think of a fix, feel free to submit a PR :)

@ericmorand
Copy link
Member

ericmorand commented Jul 28, 2019

@ryuran could you please provide an example of webpack config that fails? I'd like to add it the the integration test suite of my loader - and hopefully next version of this one.

It uses the source parameter to compile the template:

https://github.com/ericmorand/twing-loader/blob/master/src/index.ts

But I still need to test it with your config - or a relevant subset of it.

@ericmorand
Copy link
Member

@ryuran Could you give twing-loader@2 a try?

@ericmorand ericmorand added the bug Something isn't working label Aug 14, 2019
@ryuran
Copy link
Contributor Author

ryuran commented Aug 15, 2019

As soon as i'm back from vacation

@ryuran
Copy link
Contributor Author

ryuran commented Oct 5, 2022

ho damn. my vacation wasn't so long…
I don't work anymore with twig/twing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants