Created
April 22, 2016 10:11
-
-
Save marcingolenia/2fa78ed2cd42f9294da5edd22d351245 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
/*eslint-disable no-var*/ | |
var path = require('path'); | |
var AureliaWebpackPlugin = require('aurelia-webpack-plugin'); | |
var ProvidePlugin = require('webpack/lib/ProvidePlugin'); | |
module.exports = { | |
resolve: { | |
extensions: ['', '.js', '.ts'] | |
}, | |
output: { | |
path: path.join(__dirname, 'build'), | |
filename: 'bundle.js' | |
}, | |
resolve: { | |
alias: { | |
jquery: path.resolve(__dirname, 'node_modules', 'jquery', 'dist', 'jquery.js') | |
} | |
}, | |
devServer: { | |
host: 'localhost', | |
port: 3000 | |
}, | |
entry: { | |
main: [ | |
'./src/main' | |
] | |
}, | |
node: { | |
fs: "empty" | |
}, | |
plugins: [ | |
new AureliaWebpackPlugin({ | |
includeSubmodules:[ | |
] | |
}), | |
new ProvidePlugin( | |
{ | |
Promise: 'bluebird', | |
$: "jquery", | |
jQuery: "jquery", | |
"window.jQuery": "jquery", // this doesn't expose jQuery property for window, but expose it to every module | |
} | |
) | |
], | |
module: { | |
loaders: [ | |
{ test: /\.ts$/, loader: 'ts-loader' }, | |
{ test: /\jquery.dataTables.js/, loader: 'imports?define=>false'}, | |
{ test: /\.css?$/, loader: 'style!css'}, | |
{ test: /\.html$/, loader: 'raw' }, | |
{ test: /\.(png|gif|jpg)$/, loader: 'url-loader?limit=8192' }, | |
{ test: /\.woff2(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: 'url-loader?limit=10000&mimetype=application/font-woff2' }, | |
{ test: /\.woff(\?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' } | |
] | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment