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

Allow pug file extensions in html-resource-plugin #385

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

qraynaud
Copy link

I'm using pug & webpack and found out that

<require from="resources/elements/simple-component.pug"></require>

was not working.

After looking into the codebase I found out that this seems to fix the issue though I'm not sure it's the proper way to do this.

Ideally I would have loved to find a way to make this configurable in main.js and even the webpack aurelia plugin viewExtensions option to be included in environment and looked for by the generated main.js file. Maybe with something like :

export function configure(aurelia) {
  aurelia.use
    .standardConfiguration()
    .plugin(PLATFORM.moduleName('aurelia-validation'))
    .plugin(PLATFORM.moduleName('aurelia-animator-css'))
    .feature(PLATFORM.moduleName('resources/index'))
  ;

  if (environment.viewExtensions) {
    aurelia.setViewExtensions(environment.viewExtensions);
  }
}

But it's too big a change for me at this point. And I think it would have impacts cross repositories so it's better to get things done by smaller steps I suppose.

Hope this helps!

@CLAassistant
Copy link

CLAassistant commented Jul 10, 2019

CLA assistant check
All committers have signed the CLA.

@qraynaud qraynaud force-pushed the patch-1 branch 2 times, most recently from a4a92d4 to 1ce651d Compare July 10, 2019 12:42
@qraynaud
Copy link
Author

qraynaud commented Sep 8, 2019

I rebased my PR hoping it would fix the tests failing. I'm glad it did ;)

If you need me to improve my code over this, I'll be glad to do so. Just point me in the right direction and I'll do it.

I have been running this patch in production for over a month and it seems stable enough. I hope this helps.

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.

None yet

2 participants