Last active
December 16, 2015 18:02
-
-
Save kordano/8b3766d0a1504b3f6f5b to your computer and use it in GitHub Desktop.
webpack full react web app config and npm packages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "WEB APP", | |
"version": "1.0.0", | |
"description": "DESCRIPTION", | |
"main": "server.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1", | |
"dev": "webpack-dev-server --inline", | |
"start": "node_modules/.bin/babel-node server.js" | |
}, | |
"repository": { | |
"type": "git", | |
"url": "git+https://github.com/kordano/WEBAPP.git" | |
}, | |
"keywords": [ | |
"WEB", | |
"APP" | |
], | |
"author": "Konrad Kühne", | |
"license": "ISC", | |
"bugs": { | |
"url": "https://github.com/kordano/WEBAPP/issues" | |
}, | |
"babel": { | |
"presets": [ | |
"react", | |
"es2015" | |
] | |
}, | |
"homepage": "https://github.com/kordano/WEBAPP#readme", | |
"dependencies": { | |
"express": "^4.13.3", | |
"redis": "^2.4.2" | |
}, | |
"devDependencies": { | |
"babel-core": "^6.3.17", | |
"babel-loader": "^6.2.0", | |
"babel-preset-es2015": "^6.3.13", | |
"babel-preset-react": "^6.3.13", | |
"chai": "^3.4.1", | |
"chai-immutable": "^1.5.3", | |
"css-loader": "^0.23.0", | |
"file-loader": "^0.8.5", | |
"img-loader": "^1.2.2", | |
"mocha": "^2.3.4", | |
"node-sass": "^3.4.2", | |
"react": "^0.14.3", | |
"react-dom": "^0.14.3", | |
"sass-loader": "^3.1.2", | |
"style-loader": "^0.13.0", | |
"url-loader": "^0.5.7", | |
"webpack": "^1.12.9", | |
"webpack-dev-server": "^1.14.0" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var path = require('path'), | |
node_modules = path.resolve(__dirname, 'node_modules'), | |
contentBase = path.resolve(__dirname, 'dist'); | |
var config = { | |
entry: [ | |
path.resolve(__dirname, 'src', 'client', 'core.jsx') | |
], | |
module: { | |
loaders: [{ | |
test: /\.jsx?$/, | |
exclude: [node_modules], | |
loader: 'babel', | |
query: { | |
presets: ['react', 'es2015'] | |
} | |
},{ | |
test: /\.scss$/, | |
loader: 'style!css!sass' | |
},{ | |
test: /\.png$/, | |
loader: "url-loader?limit=100000" | |
},{ | |
test: /\.jpg$/, | |
loader: "file-loader" | |
}] | |
}, | |
resolve: { | |
extensions: ['', '.js', '.jsx', 'css', 'sass', 'scss', 'png', 'jpeg'] | |
}, | |
output: { | |
path: contentBase, | |
publicPath: '/', | |
filename: 'bundle.js' | |
}, | |
devServer: { | |
contentBase | |
} | |
} | |
module.exports = config; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment