Created
May 4, 2016 02:48
-
-
Save violetlight/b050b021b8b426a11cd283afd0189e85 to your computer and use it in GitHub Desktop.
Barebones 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
var config, path, webpack; | |
path = require('path'); | |
webpack = require('webpack'); | |
config = { | |
context: path.resolve(__dirname, 'src'), | |
entry : { | |
app: './app.js' | |
}, | |
output: { | |
path: __dirname + '/dist/js', | |
filename: '[name].js', | |
publicPath: '/js/' | |
}, | |
module: { | |
loaders: [ | |
{ | |
test: /\.html$/, | |
loader: 'html-loader', | |
}, { | |
test: /\.css$/, | |
loader: 'style!css', | |
}, { | |
test: /\.less$/, | |
loader: 'style!css!less', | |
}, { | |
test: /\.sass$/, | |
loader: 'style!css!sass?indentedSyntax', | |
}, { | |
test: /\.(woff(2)?|ttf|eot|svg|png|cur|jpg|gif)(\?v=[0-9]\.[0-9]\.[0-9])?$/, | |
loader: 'file' | |
} | |
] | |
}, | |
plugins: [ | |
new webpack.optimize.UglifyJsPlugin({mangle: false}) | |
] | |
}; | |
module.exports = config; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment