aurelia / bootstrapper-webpack

A custom bootstrapper for using Webpack with Aurelia
MIT License
8 stars 6 forks source link

Support Aurelia Plugin syntax #6

Closed Vaccano closed 8 years ago

Vaccano commented 8 years ago

JSPM supported a plugin syntax to Aurelia. It seems that webpack does not support this.

Repro:

  1. Start with the webpack typescript skeleton project.
  2. run npm install aurelia-dialog
  3. Add this to the main.ts : .plugin('aurelia-dialog') right after .developmentLogging().

Expected
Running the skeleton project will correctly add aurelia-dialog as a plugin.

Actual

Running the skeleton project gives the following error:

Cannot find module './aurelia-dialog'.

As a side note, none of these work either:

 .plugin('node_modules/aurelia-dialog/dist/commonjs/aurelia-dialog')
 .plugin('node_modules/aurelia-dialog/dist/commonjs/aurelia-dialog.js')
 .plugin('../node_modules/aurelia-dialog/dist/commonjs/aurelia-dialog')
 .plugin('../node_modules/aurelia-dialog/dist/commonjs/aurelia-dialog.js')

They all give a variation of the above error message.

EisenbergEffect commented 8 years ago

There's a setting you have to configure on the webpack plugin. See this PR for some notes: https://github.com/aurelia/skeleton-navigation/pull/393

Vaccano commented 8 years ago

@EisenbergEffect Thanks!

I am presenting Aurelia at the Utah Code Camp on Saturday, and I would love to do it with with Webpack. But so far it is kicking my but.

This helps me get past one of several things that are blocking me.

(I mostly have JSPM figured, so I can present Aurelia using that if I can't get Webpack to work.)

EisenbergEffect commented 8 years ago

Excellent to hear you are presenting it! Thanks for helping to spread the word. There are a couple of webpack fixes we have. I’ll do a release in the next day or two. Maybe some of that will help you.

On Apr 11, 2016, at 1:55 PM, Vaccano notifications@github.com wrote:

@EisenbergEffect Thanks!

I am presenting Aurelia at the Utah Code Camp on Saturday, and I would love to do with with Webpack. But so far it is kicking my but. 

This helps me get past one of several things that are blocking me.

(I mostly have JSPM figured, so I can present Aurelia using that if I can't get Webpack to work.)

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub

Vaccano commented 8 years ago

@EisenbergEffect Just by chance, do any of those fixes have to do with console not being setup correctly? (as in console.log is not a function).

That is what is messing me up right now and if there is a fix for it, well, I can stop hitting my head against that wall.

EisenbergEffect commented 8 years ago

I haven't heard anything about that actually...