mirror of
https://github.com/wassname/react-webpack-template.git
synced 2026-06-27 20:53:15 +08:00
34 lines
780 B
JavaScript
34 lines
780 B
JavaScript
var path = require('path');
|
|
var srcPath = path.join(__dirname, '/../src/');
|
|
|
|
module.exports = {
|
|
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/'
|
|
}
|
|
}
|
|
};
|