aurelia / webpack-plugin

A plugin for webpack that enables bundling Aurelia applications.
MIT License
90 stars 36 forks source link

Custom Element not working with symlinked aurelia-plugin library #165

Open alexisszabo opened 4 years ago

alexisszabo commented 4 years ago

I'm submitting a bug report

Please tell us about your environment:

Current behavior:

I have a monorepo setup as follows: |- plugin-test (Aurelia Plugin project, built with au new --plugin) |- app-test (Aurelia app project, build with au new)

I used npm (with a symlinked file version) to install the plugin-test plugin into the app-test app. The sample attributes, binding-behaviors, and value-converters all work fine in the app-test app. However, the <hello-world></hello-world> element does not render.

Expected/desired behavior: I expected the <hello-world></hello-world> element to work. I also tried using the @inlineView, @useView and @useView(PLATFORM.moduleName("...")) decorators (and then rebuilding the plugin library with au build-plugin), but that did not seem to help.

I created a reproduction here: https://github.com/alexisszabo/aurelia-plugin-element-issue

This issue seems related to https://github.com/aurelia/webpack-plugin/issues/164, but I have had no success with the suggestions there. It looks like I should ideally be using @fromView in my plugin library for custom elements, but that did not seem to work for me.

alexisszabo commented 4 years ago

Is the above a supported configuration with webpack-plugin? https://github.com/aurelia/webpack-plugin/issues/164#issuecomment-521470928 seems to suggest to use the cli-bundler for the view resources to resolve properly.