Skip to content

Commit

Permalink
Fix loading symlinked webpack configuration. (#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
vikhyat authored and zinserjan committed Jul 17, 2017
1 parent ab46baf commit 6b834a1
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/cli/requireWebpackConfig.js
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ const extensions = Object.keys(interpret.extensions).sort(sortExtensions);

function fileExists(filePath) {
try {
return fs.lstatSync(filePath).isFile();
return fs.existsSync(filePath);
} catch (e) {
return false;
}
5 changes: 5 additions & 0 deletions test/unit/cli/requireWebpackConfig.test.js
Original file line number Diff line number Diff line change
@@ -16,6 +16,11 @@ describe('requireWebpackConfig', () => {
assert.deepEqual(requireWebpackConfig(configPath), expectedConfig);
});

(process.platform === 'win32' ? it.skip : it)('requires symlinked config file', () => {
const configPath = getConfigPath('.js', 'config-symlink');
assert.deepEqual(requireWebpackConfig(configPath), expectedConfig);
});

it('requires Babel Webpack config file', () => {
const configPath = getConfigPath('.babel.js');
assert.deepEqual(requireWebpackConfig(configPath), expectedConfig);

0 comments on commit 6b834a1

Please sign in to comment.