Skip to content

Conversation

ulrikstrid
Copy link
Contributor

ES6 modules are always strict so 'use strict'; unnecessary when using that as output. I'm not sure if this is a real problem as it will probably be removed by uglify or similar but that depends on if it is smart enough I guess.

http://www.ecma-international.org/ecma-262/6.0/#sec-strict-mode-code

Module code is always strict mode code.

I'm kind of new to this (coming here via ReasonML) so any pointers on how to do this better are appreciated.

@glennsl
Copy link
Contributor

glennsl commented Feb 16, 2018

Restarted CI for you. It seems to have a problem with getting stuck these days

let output_dir = Filename.dirname output_prefix in
P.string f L.strict_directive;
P.newline f ;
let output_dir = Filename.dirname output_prefix in
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am unclear how does this achieve the desired behavior?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of outputting it on all files it's just amd and commonjs

@bobzhang bobzhang merged commit 2f3e494 into rescript-lang:master Feb 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants