lasso-js / lasso

Advanced JavaScript module bundler, asset pipeline and optimizer
582 stars 75 forks source link

Marko integration does not work without marko/node-require #227

Open ejulen opened 6 years ago

ejulen commented 6 years ago

As the title says, the Marko integration does not seem to work without using the marko/node-require require hook, which according to the Lasso readme should not be used since it is deprecated:

NOTE: The reason we use require.resolve('./template.marko') instead of require('template.marko') is that Node.js does not understand how to load .marko modules and the use of the require.extensions has been deprecated.

I have made an example repository that illustrates this issue. Something I find interesting: if you remove the lasso-* tags (that is, using plain Marko), it works (but you obviously don't get any Lasso functionality).

maxmilton commented 6 years ago

That text you mention says that using require.extensions is deprecated not that using marko/node-require is deprecated.