| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| }); | ||
|
|
||
| const PRESERVE_SYMLINKS = !!argv['preserve-symlinks'] || | ||
| process.env.NODE_PRESERVE_SYMLINKS + '' === '1'; |
There was a problem hiding this comment.
I usually vote for explicit coercions, cause it's easier to figure out what was the initial intention. So would like to suggest to use here smthing like this:
const PRESERVE_SYMLINKS = Boolean(argv['preserve-symlinks']) ||
String(process.env.NODE_PRESERVE_SYMLINKS) === '1';
Sorry, something went wrong.
There was a problem hiding this comment.
And looks like that minimist has already done necessary typecasting here :)
Sorry, something went wrong.
|
|
||
| function resolveModule(filepath, {cwd, resolve: resolvecfg = {}}) { | ||
| const preserveSymlinks = resolvecfg.preserveSymlinks !== undefined | ||
| ? !!resolvecfg.preserveSymlinks : PRESERVE_SYMLINKS; |
There was a problem hiding this comment.
Just thought that it would be nice to move all the necessary coercions of options (and checking) to the plugin initialisation, so we can keep it at one place. But it doesn't look as an issue at the current step :)
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
generate consistent paths for imported files, defaults to nodejs behaviour.
consistency important: f.ex. postcss-icss-selectors :local hashes are based on filenames. browserify defaults to false (like nodejs), hence resolved filenames would be different between browserify plugins and postcss-modules-resolve-imports.
more info: browserify/browserify#1742 nodejs/node#3402