Last active
January 28, 2016 19:30
-
-
Save Vayvala/67d728f86b564ccdf02e 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
'use strict'; | |
const fs = require('fs'); | |
const path = require('path'); | |
const webpack = require('webpack'); | |
const srcDir = 'public'; | |
const dstDir = 'dist'; | |
const entry = 'entry.js'; | |
const output = 'bundle.js'; | |
const config = { | |
context: path.join(__dirname, srcDir), | |
entry: { | |
app: [path.join(__dirname, srcDir, entry)], | |
}, | |
output: { | |
path: path.join(__dirname, dstDir), | |
filename: output, | |
}, | |
module: { | |
loaders: [ | |
{test: /\.js$/, loader: 'ng-annotate', exclude: /node_modules/}, | |
{test: /\.js$/, loader: 'babel', exclude: /node_modules/, query: { | |
presets: ['es2015'] | |
}}, | |
{test: /\.html$/, loader: 'html', exclude: /node_modules/}, | |
{test: /\.css$/, loader: 'style!css'}, | |
{test: /\.(jpg|png)$/, loader: 'url?limit=10000'}, | |
{test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: 'url-loader?limit=10000&mimetype=application/font-woff'}, | |
{test: /\.(ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: 'file-loader'} | |
], | |
}, | |
resolve: { | |
root: path.resolve(__dirname), | |
alias: {}, | |
extensions: ['', '.js', '.es6'] | |
} | |
}; | |
module.exports = config; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment