Skip to content

Commit

Permalink
Test for the full path - closes #222
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffreyWay committed Jan 30, 2017
1 parent b2808ca commit 9d9c52f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion setup/webpack.config.js
Expand Up @@ -125,7 +125,7 @@ if (Mix.preprocessors) {
let sourceMap = Mix.sourcemaps ? '?sourceMap' : '';

module.exports.module.rules.push({
test: new RegExp(toCompile.src.fileWithDir.replace(/\\/g, '\\\\') + '$'),
test: new RegExp(toCompile.src.path.replace(/\\/g, '\\\\') + '$'),
loader: extractPlugin.extract({
fallbackLoader: 'style-loader',
loader: [
Expand Down
1 change: 0 additions & 1 deletion src/File.js
Expand Up @@ -105,7 +105,6 @@ class File {
hashedPath: path.join(outputSegments.dir, `${outputSegments.name}.[hash]${outputSegments.ext}`),
base: outputSegments.dir,
file: outputSegments.base,
fileWithDir: path.join(outputSegments.dir.split('/').pop(), outputSegments.base),
hashedFile: `${outputSegments.name}.[hash]${outputSegments.ext}`,
name: outputSegments.name,
isDir: ! outputSegments.ext,
Expand Down
1 change: 0 additions & 1 deletion test/file.js
Expand Up @@ -11,7 +11,6 @@ test('that it parses a path into segments', t => {
hashedPath: 'some/path/to/a/file.[hash].txt',
base: 'some/path/to/a',
file: 'file.txt',
fileWithDir: 'a/file.txt',
hashedFile: 'file.[hash].txt',
name: 'file',
isDir: false,
Expand Down

0 comments on commit 9d9c52f

Please sign in to comment.