Skip to content

Commit

Permalink
Fixed use strict issue in assembler.
Browse files Browse the repository at this point in the history
  • Loading branch information
jon-a-nygaard committed Feb 20, 2017
1 parent 322efd9 commit 9e166b2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions assembler/dependencies.js
Expand Up @@ -109,7 +109,8 @@ const applyUMD = content => {
};

const applyModule = content => {
return ['(function (factory) {',
return ['\'use strict\';',
'(function (factory) {',
'if (typeof module === \'object\' && module.exports) {',
'module.exports = factory;',
'} else {',
Expand Down Expand Up @@ -202,7 +203,7 @@ const moduleTransform = (content, options) => {
// Remove license headers from modules
content = removeLicenseHeader(content);
// Remove use strict from modules
content = content.replace(/\'use strict\';\r\n/, '');
content = content.replace(/\'use strict\';\r?\n/, '');
// Remove import statements
// @todo Add imported variables to the function arguments. Reuse getImports for this
content = content.replace(/import\s[^\n]+\n/g, '')
Expand Down

0 comments on commit 9e166b2

Please sign in to comment.