Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

fix: get realpath from __filename instead of __dirname (NS) #618

Merged
merged 1 commit into from
Sep 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
isFunction,
} from './lib/helpers';

const NS = fs.realpathSync(__dirname);
const NS = path.dirname(fs.realpathSync(__filename));

let nextId = 0;

Expand Down
3 changes: 2 additions & 1 deletion src/loader.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import fs from 'fs';
import path from 'path';
import loaderUtils from 'loader-utils';
import NodeTemplatePlugin from 'webpack/lib/node/NodeTemplatePlugin';
import NodeTargetPlugin from 'webpack/lib/node/NodeTargetPlugin';
import LibraryTemplatePlugin from 'webpack/lib/LibraryTemplatePlugin';
import SingleEntryPlugin from 'webpack/lib/SingleEntryPlugin';
import LimitChunkCountPlugin from 'webpack/lib/optimize/LimitChunkCountPlugin';

const NS = fs.realpathSync(__dirname);
const NS = path.dirname(fs.realpathSync(__filename));

export default source => source;

Expand Down