mirror of
https://github.com/wassname/react-webpack-template.git
synced 2026-07-28 11:25:07 +08:00
Added own configuration objects for different webpack environments.
This commit is contained in:
+3
-36
@@ -1,5 +1,4 @@
|
||||
var path = require('path');
|
||||
var srcPath = __dirname + '/src/';
|
||||
var webpackCfg = require('./webpack.config');
|
||||
|
||||
module.exports = function(config) {
|
||||
config.set({
|
||||
@@ -12,46 +11,14 @@ module.exports = function(config) {
|
||||
captureTimeout: 60000,
|
||||
frameworks: ['phantomjs-shim', 'mocha', 'chai'],
|
||||
client: {
|
||||
mocha: {
|
||||
|
||||
}
|
||||
mocha: {}
|
||||
},
|
||||
singleRun: true,
|
||||
reporters: ['mocha'],
|
||||
preprocessors: {
|
||||
'test/loadtests.js': ['webpack', 'sourcemap']
|
||||
},
|
||||
webpack: {
|
||||
cache: true,
|
||||
devtool: 'eval',
|
||||
module: {
|
||||
loaders: [
|
||||
{
|
||||
test: /\.(png|jpg|gif|woff|woff2|css|sass|scss|less|styl)$/,
|
||||
loader: 'null-loader'
|
||||
},
|
||||
{
|
||||
test: /\.(js|jsx)$/,
|
||||
loader: 'babel-loader',
|
||||
include: [
|
||||
path.join(__dirname, 'src'),
|
||||
path.join(__dirname, 'test')
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
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/'
|
||||
}
|
||||
}
|
||||
},
|
||||
webpack: webpackCfg,
|
||||
webpackServer: {
|
||||
noInfo: true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user