mirror of
https://github.com/wassname/react-webpack-template.git
synced 2026-07-10 09:24:33 +08:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4c7e9732af | |||
| 570db8e4ea |
@@ -8,11 +8,11 @@ The following features are planned to be included in the final version:
|
|||||||
- [x] Webpack and Webpack-Dev-Server, including hot-loader
|
- [x] Webpack and Webpack-Dev-Server, including hot-loader
|
||||||
- [x] Babel and JSX
|
- [x] Babel and JSX
|
||||||
- [x] Mocha Unit tests (*optional*)
|
- [x] Mocha Unit tests (*optional*)
|
||||||
- [ ] React.Router
|
|
||||||
- [x] EsLint Support
|
- [x] EsLint Support
|
||||||
- [x] No dependency on grunt, gulp or the next hot taskrunner!
|
- [x] No dependency on grunt, gulp or the next hot taskrunner!
|
||||||
|
|
||||||
## Todo
|
## Todo
|
||||||
|
- [ ] Better performance for webpack builds
|
||||||
- [ ] The dynamic webpack configuration is clunky, there must be a better way to do that!
|
- [ ] The dynamic webpack configuration is clunky, there must be a better way to do that!
|
||||||
- [ ] Karmas webpack configuration is not included in the global webpack.config.js file, but it really should
|
- [ ] Karmas webpack configuration is not included in the global webpack.config.js file, but it really should
|
||||||
|
|
||||||
|
|||||||
+5
-2
@@ -23,7 +23,7 @@ module.exports = function(config) {
|
|||||||
},
|
},
|
||||||
webpack: {
|
webpack: {
|
||||||
cache: true,
|
cache: true,
|
||||||
devtool: 'inline-source-map',
|
devtool: 'eval',
|
||||||
module: {
|
module: {
|
||||||
loaders: [
|
loaders: [
|
||||||
{
|
{
|
||||||
@@ -33,7 +33,10 @@ module.exports = function(config) {
|
|||||||
{
|
{
|
||||||
test: /\.(js|jsx)$/,
|
test: /\.(js|jsx)$/,
|
||||||
loader: 'babel-loader',
|
loader: 'babel-loader',
|
||||||
exclude: /node_modules/
|
include: [
|
||||||
|
path.join(__dirname, 'src'),
|
||||||
|
path.join(__dirname, 'test')
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "react-webpack-template",
|
"name": "react-webpack-template",
|
||||||
"version": "0.0.5",
|
"version": "0.0.6",
|
||||||
"description": "A base skeleton template for react and webpack without task runners",
|
"description": "A base skeleton template for react and webpack without task runners",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
+3
-3
@@ -37,7 +37,7 @@ var config = {
|
|||||||
preLoaders: [
|
preLoaders: [
|
||||||
{
|
{
|
||||||
test: /\.(js|jsx)$/,
|
test: /\.(js|jsx)$/,
|
||||||
exclude: /node_modules/,
|
include: path.join(__dirname, 'src'),
|
||||||
loader: 'eslint-loader'
|
loader: 'eslint-loader'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -59,7 +59,7 @@ switch(env) {
|
|||||||
case 'dist':
|
case 'dist':
|
||||||
config.entry = './src/components/run';
|
config.entry = './src/components/run';
|
||||||
config.cache = false;
|
config.cache = false;
|
||||||
config.devtool = false;
|
config.devtool = 'sourcemap';
|
||||||
config.plugins = [
|
config.plugins = [
|
||||||
new webpack.optimize.DedupePlugin(),
|
new webpack.optimize.DedupePlugin(),
|
||||||
new webpack.optimize.UglifyJsPlugin(),
|
new webpack.optimize.UglifyJsPlugin(),
|
||||||
@@ -83,7 +83,7 @@ switch(env) {
|
|||||||
'./src/components/run'
|
'./src/components/run'
|
||||||
];
|
];
|
||||||
config.cache = true;
|
config.cache = true;
|
||||||
config.devtool = 'sourcemap';
|
config.devtool = 'eval';
|
||||||
config.plugins = [
|
config.plugins = [
|
||||||
new webpack.HotModuleReplacementPlugin(),
|
new webpack.HotModuleReplacementPlugin(),
|
||||||
new webpack.NoErrorsPlugin()
|
new webpack.NoErrorsPlugin()
|
||||||
|
|||||||
Reference in New Issue
Block a user