1

I am trying to use converse.js and load it with webpack. Converse.js loads there templates like this:

define("converse-templates", [
    "tpl!action",
    "tpl!add_contact_dropdown",
    "tpl!add_contact_form",

Which gives me an error like this:

ERROR in ./apps/chat/static/conversejs/src/templates.js
Module not found: Error: Cannot resolve module 'tpl' in /home/vagrant/workspace/src/apps/chat/static/conversejs/src
resolve module tpl in /home/vagrant/workspace/src/apps/chat/static/conversejs/src
  looking for modules in /home/vagrant/workspace/src/node_modules

In my own, source I use:

define(["app",
        "ejs!apps/track_list/main/templates/layout.tpl",
        "ejs!apps/track_list/main/templates/command_buttons.tpl",
        "ejs!apps/track_...

Which works fine with the ejs-loader. How do I alias the loader directives in webpack?

sww314
  • 1,252
  • 13
  • 17

1 Answers1

0

You can use resolveLoader.alias

https://webpack.github.io/docs/configuration.html#resolveloader

Mike Blandford
  • 3,952
  • 4
  • 29
  • 32