AEM6 and Commonjs | Community
Skip to main content
olivier_wietric
October 16, 2015
Solved

AEM6 and Commonjs

  • October 16, 2015
  • 1 reply
  • 569 views

Hi everybody,

I would like to know if it's possible to use Commonjs in the front end? Here's an example:

var hello = require('hello'); module.exports = hello() + 'world';

I'm not a big fan or AMD and the JavaScript use API provided. 

Commonjs in the front end usually requires a build step and I was also wondering if AEM is flexible enough to allow custom/external builds for JS and CSS  (no css.txt or js.txt)

Thanks in advance

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Sham_HC

Out of the box does not provide & not seen personally any implementation so far.  Technically it will work & you might face some challenges specifically with css since is no cross-browser onload event for CSS.

1 reply

Sham_HC
Sham_HCAccepted solution
Level 10
October 16, 2015

Out of the box does not provide & not seen personally any implementation so far.  Technically it will work & you might face some challenges specifically with css since is no cross-browser onload event for CSS.