Skip to content

require() statement remains in compiled ember.js #2213

Description

@craigteegarden

The change occurred in d4e6a5c specifically here:

Handlebars = require('handlebars');

if(!Handlebars && typeof require === 'function') {
  Handlebars = require('handlebars');
}

This require statement is present in the ember.js file after being built. This interferes with the grunt-based build system I'm using, specifically the neuter plugin (this is based off of https://github.com/trek/ember-todos-with-build-tools-tests-and-other-modern-conveniences/).

The neuter plugin detects the require() statement and tries to replace it with a local file named handlebars.js which doesn't exist, causing:

if(!Handlebars && typeof require === 'function') {
  Handlebars = 

})();

which then breaks when loaded into a browser.

Is ember-handlebars-compiler supposed to be included in the compiled version of ember.js? Is there a way to not include this statement/module in the final output? I currently can work around this by editing the file to remove the require statement manually.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions