Created
July 30, 2015 18:14
-
-
Save ninetails/815d16d1300ca7edb91f to your computer and use it in GitHub Desktop.
webpack config
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": "nonono", | |
| "version": "0.0.0", | |
| "description": "xoxoxo", | |
| "scripts": { | |
| "start": "webpack-dev-server --hot --progress --colors -d", | |
| "build": "webpack --progress --colors --config webpack.production.js" | |
| }, | |
| "author": "Carlos Kazuo", | |
| "license": "ISC", | |
| "devDependencies": { | |
| "babel-core": "^5.7.3", | |
| "babel-loader": "^5.3.2", | |
| "css-loader": "^0.15.4", | |
| "file-loader": "^0.8.4", | |
| "imagemin": "^3.2.0", | |
| "node-libs-browser": "^0.5.2", | |
| "react-hot-loader": "^1.2.8", | |
| "style-loader": "^0.12.3", | |
| "stylus-loader": "^1.2.1", | |
| "svg-inline-loader": "^0.2.1", | |
| "svgo": "^0.5.3", | |
| "svgo-loader": "^1.1.0", | |
| "webpack": "^1.10.1", | |
| "webpack-dev-server": "^1.10.1" | |
| }, | |
| "dependencies": { | |
| "accounting": "^0.4.1", | |
| "debounce": "^1.0.0", | |
| "jquery.inputmask": "^3.1.63", | |
| "moment": "^2.10.3", | |
| "react": "^0.13.3" | |
| } | |
| } |
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
| var webpack = require('webpack'); | |
| module.exports = { | |
| entry: [ | |
| 'webpack/hot/only-dev-server', | |
| __dirname + "/app/index.jsx" | |
| ], | |
| output: { | |
| path: __dirname, | |
| filename: "bundle.js" | |
| }, | |
| externals: { | |
| jquery: "jQuery" | |
| }, | |
| module: { | |
| loaders: [ | |
| { test: /\.jsx?$/, loaders: ['react-hot', 'babel'], exclude: /node_modules/ }, | |
| { test: /\.styl$/, loader: "style!css!stylus", exclude: /node_modules/ }, | |
| { test: /\.svg$/, loader: 'svg-inline!svgo?useConfig=svgoConfig', exclude: /node_modules/ } | |
| ] | |
| }, | |
| plugins: [ | |
| new webpack.NoErrorsPlugin() | |
| ], | |
| svgoConfig: { | |
| plugins: [ | |
| { removeTitle: true } | |
| ] | |
| } | |
| }; |
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
| var webpack = require('webpack'); | |
| module.exports = { | |
| entry: "./app/index.jsx", | |
| output: { | |
| path: __dirname, | |
| filename: "bundle.min.js" | |
| }, | |
| externals: { | |
| jquery: "jQuery" | |
| }, | |
| module: { | |
| loaders: [ | |
| { test: /\.jsx?$/, loader: 'babel', exclude: /node_modules/ }, | |
| { test: /\.styl$/, loader: "style!css?minimize!stylus", exclude: /node_modules/ }, | |
| { test: /\.svg$/, loader: 'svg-inline!svgo?useConfig=svgoConfig', exclude: /node_modules/ } | |
| ] | |
| }, | |
| plugins: [ | |
| new webpack.NoErrorsPlugin(), | |
| new webpack.optimize.DedupePlugin(), | |
| new webpack.optimize.UglifyJsPlugin({ | |
| output: { | |
| comments: false | |
| } | |
| }) | |
| ], | |
| svgoConfig: { | |
| plugins: [ | |
| { removeTitle: true } | |
| ] | |
| } | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment