Created
May 30, 2015 23:19
-
-
Save fforres/8f423cc764a66fed958f to your computer and use it in GitHub Desktop.
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": "webpack", | |
"version": "0.0.0", | |
"authors": [ | |
"[email protected] <felipe torres>" | |
], | |
"license": "MIT", | |
"ignore": [ | |
"**/.*", | |
"node_modules", | |
"bower_components", | |
"app/bower_components", | |
"test", | |
"tests" | |
], | |
"dependencies": { | |
"bootstrap": "~3.3.4" | |
} | |
} |
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": "webpack", | |
"version": "1.0.0", | |
"description": "", | |
"main": "bundle.js", | |
"devDependencies": { | |
"angular": "^1.4.0", | |
"angular-resource": "^1.4.0", | |
"angular-ui-router": "^0.2.15", | |
"angular-webpack-plugin": "0.0.3", | |
"babel-core": "^5.4.7", | |
"babel-loader": "^5.1.3", | |
"bootstrap": "^3.3.4", | |
"bootstrap-webpack": "0.0.3", | |
"bower-webpack-plugin": "^0.1.8", | |
"css-loader": "^0.14.4", | |
"exports-loader": "^0.6.2", | |
"file-loader": "^0.8.4", | |
"imports-loader": "^0.6.4", | |
"jquery": "^2.1.4", | |
"less": "^2.5.1", | |
"less-loader": "^2.2.0", | |
"moment": "^2.10.3", | |
"node-libs-browser": "^0.5.2", | |
"raw-loader": "^0.5.1", | |
"style-loader": "^0.12.3", | |
"url-loader": "^0.5.6", | |
"webpack": "^1.9.10" | |
}, | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"author": "", | |
"license": "ISC" | |
} |
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"); | |
var path = require("path"); | |
module.exports = { | |
context: __dirname + '/app', | |
entry: './index.js', | |
output: { | |
path: __dirname + '/app', | |
filename: 'noders.js' | |
}, | |
resolve: { | |
root: [path.join(__dirname, "app/bower_components")] | |
}, | |
module: { | |
loaders: [ | |
// **IMPORTANT** This is needed so that each bootstrap js file required by | |
// bootstrap-webpack has access to the jQuery object | |
{ | |
test: /bootstrap\/js\//, | |
loader: 'imports?jQuery=jquery' | |
}, | |
// Needed for the css-loader when [bootstrap-webpack](https://github.com/bline/bootstrap-webpack) | |
// loads bootstrap's css. | |
{ | |
test: /\.woff(\?v=\d+\.\d+\.\d+)?$/, | |
loader: "url?limit=10000&minetype=application/font-woff" | |
}, { | |
test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/, | |
loader: "url?limit=10000&minetype=application/font-woff2" | |
}, { | |
test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, | |
loader: "url?limit=10000&minetype=application/octet-stream" | |
}, { | |
test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, | |
loader: "file" | |
}, { | |
test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, | |
loader: "url?limit=10000&minetype=image/svg+xml" | |
}, { | |
test: /\.css$/, | |
loader: 'style!css', | |
exclude: /node_modules/ | |
}, { | |
test: /\.html$/, | |
loader: 'raw', | |
exclude: /node_modules/ | |
}, { | |
test: /\.js$/, | |
loader: 'babel', | |
exclude: [/node_modules/, /bower_components/] | |
} | |
] | |
}, | |
plugins: [ | |
new webpack.ResolverPlugin( | |
new webpack.ResolverPlugin.DirectoryDescriptionFilePlugin("bower.json", ["dependencies"]) | |
) | |
] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment