Last active
December 27, 2016 21:02
-
-
Save techhahn/178e01886f9363ce6ee017449b917735 to your computer and use it in GitHub Desktop.
Webpack basic setup
This file contains hidden or 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
| module.exports = { | |
| entry: './app/index.js', | |
| output: { | |
| path: './dist/', | |
| filename: 'bundle.js' | |
| }, | |
| devServer: { | |
| inline: true, | |
| port: 8080 | |
| }, | |
| module: { | |
| loaders: [ | |
| { | |
| test: /\.(png|jpg)$/, | |
| loader: "url-loader" | |
| }, | |
| { | |
| test: /\.scss$/, | |
| loader: 'style-loader!css-loader!sass-loader' | |
| }, | |
| { | |
| test: /\.js?$/, | |
| exclude: /node_modules/, | |
| loader: 'babel-loader', | |
| query: { | |
| presets: [ | |
| 'es2015' | |
| ] | |
| } | |
| } | |
| ] | |
| } | |
| } |
This file contains hidden or 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": "redux-tuts", | |
| "version": "1.0.0", | |
| "description": "", | |
| "main": "index.js", | |
| "scripts": { | |
| "start": "webpack-dev-server", | |
| "test": "echo \"Error: no test specified\" && exit 1" | |
| }, | |
| "author": "", | |
| "license": "ISC", | |
| "dependencies": { | |
| "babel": "^6.5.2", | |
| "babel-cli": "^6.18.0", | |
| "babel-core": "^6.21.0", | |
| "babel-preset-env": "^1.1.4", | |
| "pubsub-js": "^1.5.4", | |
| "redux": "^3.6.0", | |
| "webpack": "^1.14.0", | |
| "webpack-dev-server": "^1.16.2" | |
| }, | |
| "devDependencies": { | |
| "babel-cli": "^6.18.0", | |
| "babel-core": "^6.21.0", | |
| "babel-loader": "^6.2.10", | |
| "babel-preset-env": "^1.1.4", | |
| "babel-preset-es2015": "^6.18.0", | |
| "redux-devtools": "^3.3.1" | |
| } | |
| } |
This file contains hidden or 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
| module.exports = { | |
| entry: './app/index.js', | |
| output: { | |
| path: './dist/', | |
| filename: 'bundle.js' | |
| }, | |
| devServer: { | |
| inline: true, | |
| port: 8080 | |
| }, | |
| module: { | |
| loaders: [ | |
| { | |
| test: /\.js?$/, | |
| exclude: /node_modules/, | |
| loader: 'babel-loader', | |
| query: { | |
| presets: [ | |
| 'es2015' | |
| ] | |
| } | |
| } | |
| ] | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment