Created
August 7, 2017 15:58
-
-
Save 1tgr/fd47677f963fd8918eb276a61439ceae to your computer and use it in GitHub Desktop.
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": "portfolio-app", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"build": "node_modules/.bin/webpack --progress --profile --colors", | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"author": "", | |
"license": "ISC", | |
"dependencies": { | |
"bootstrap": "^3.3.7", | |
"css-loader": "^0.25.0", | |
"extract-text-webpack-plugin": "^1.0.1", | |
"file-loader": "^0.9.0", | |
"jquery": "^3.1.1", | |
"knockout": "^3.4.0", | |
"less": "^2.7.1", | |
"less-loader": "^2.2.3", | |
"manifest-revision-webpack-plugin": "^0.0.5", | |
"style-loader": "^0.13.1", | |
"url-loader": "^0.5.7", | |
"webpack": "^1.9.10" | |
} | |
} |
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 ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
var ManifestRevisionPlugin = require('manifest-revision-webpack-plugin'); | |
var path = require('path'); | |
var webpack = require('webpack'); | |
module.exports = { | |
entry: { | |
deps: './js/deps.js', | |
index: './js/index.js', | |
bootstrap: 'bootstrap/dist/css/bootstrap.css', | |
email: './less/email.less' | |
}, | |
output: { | |
path: 'portfolio_app/assets', | |
filename: '[name].[chunkhash].js' | |
}, | |
module: { | |
loaders: [ | |
{ test: /\.css$/, loader: ExtractTextPlugin.extract('style-loader', 'css-loader') }, | |
{ test: /\.less/, loader: ExtractTextPlugin.extract('style-loader', 'css-loader!less-loader') }, | |
{ test: /\.(woff|woff2)$/, loader: 'url-loader?limit=10000&mimetype=application/font-woff' }, | |
{ test: /\.ttf$/, loader: 'file-loader' }, | |
{ test: /\.eot$/, loader: 'file-loader' }, | |
{ test: /\.svg$/, loader: 'file-loader' } | |
] | |
}, | |
plugins: [ | |
new ExtractTextPlugin('[name].[chunkhash].css'), | |
new ManifestRevisionPlugin(path.join('build', 'manifest.json'), { | |
rootAssetPath: 'static' | |
}) | |
, new webpack.optimize.UglifyJsPlugin() | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment