Skip to content
Open
Changes from 1 commit
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
Prev Previous commit
Webpack test.js uses resolve.root too
I realised I should make the change in the test config as well. 

And it seems to better if the test config inherits from baseConfig and defaultSettings where possible, so I did that. That way you are testing as close to your actual config as possible. Especially because there is one test of the config path.
  • Loading branch information
wassname committed Apr 6, 2016
commit 3a5fa7c80f0efc57254ea8381254f20d68e7bf49
17 changes: 6 additions & 11 deletions cfg/test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
'use strict';

let path = require('path');
let srcPath = path.join(__dirname, '/../src/');

let defaultSettings = require('./defaults');
let baseConfig = require('./base');

// Add needed plugins here
Expand Down Expand Up @@ -40,15 +39,11 @@ module.exports = {
},
resolve: {
extensions: [ '', '.js', '.jsx' ],
alias: {
actions: srcPath + 'actions/',
helpers: path.join(__dirname, '/../test/helpers'),
components: srcPath + 'components/',
sources: srcPath + 'sources/',
stores: srcPath + 'stores/',
styles: srcPath + 'styles/',
config: srcPath + 'config/' + process.env.REACT_WEBPACK_ENV
}
root: [].concat(
baseConfig.resolve.root,
[`${defaultSettings.srcPath}/test`]
),
alias: baseConfig.resolve.alias
},
plugins: [
new BowerWebpackPlugin({
Expand Down