jhthorsen / mojolicious-plugin-webpack

Integrate your mojo app with webpack
13 stars 7 forks source link

asset "my_app" on example Mojo::Lite app #1

Closed dmanto closed 5 years ago

dmanto commented 5 years ago

I am trying to run the example app from example folder with:

$> mojo Webpack ./lite.pl

just to grasp a better understanding of the module.

Everything works fine, except for an error in my browser:

Failed to load resource: the server responded with a status of 404 (Not Found) ...
... http://localhost:3000/asset/my_app.dev.css

Trying to investigate a bit on that resource, line 16 of lite.pl script is:

    <link rel="stylesheet" href="/asset/my_app.dev.css">

but I don't see that file in the public/asset/ directory.

Also I don't understand which file should be that one, could be for example example.dev.css but in that case will be redundant I guess because in the next line we have %= asset 'example.css' that should be the same (not very sure about this though).

Installed versions:

 $> mojo version
CORE
  Perl        (v5.28.0, darwin)
  Mojolicious (8.14, Supervillain)

OPTIONAL
  Cpanel::JSON::XS 4.04+  (4.10)
  EV 4.0+                 (4.25)
  IO::Socket::Socks 0.64+ (0.74)
  IO::Socket::SSL 2.009+  (2.066)
  Net::DNS::Native 0.15+  (0.20)
  Role::Tiny 2.000001+    (2.000006)

This version is up to date, have fun!
$> node -v
v11.14.0
$> npm -v
6.9.0
$>
jhthorsen commented 5 years ago

Hi, thanks for reaching out and being the number one in filing a bug 👍

I just fixed the example now, but I'm holding off a new CPAN release.