Skip to content

Instantly share code, notes, and snippets.

@Vaccano
Created May 26, 2016 20:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Vaccano/27ae8ca6b4b4294122c7a5e67a968a47 to your computer and use it in GitHub Desktop.
Save Vaccano/27ae8ca6b4b4294122c7a5e67a968a47 to your computer and use it in GitHub Desktop.
Webpack for Aureila
var path = require('path');
var AureliaWebpackPlugin = require('aurelia-webpack-plugin');
var ProvidePlugin = require('webpack/lib/ProvidePlugin');
module.exports = {
resolve: {
extensions: ['', '.js', '.ts'],
alias: {
'breeze': 'breeze-client/build/breeze.debug'
//,'src': path.join(__dirname, 'src')
//,'images': path.join(__dirname, 'plugins/jqwidgets/images')
}
},
devServer: {
host: 'localhost',
port: 3000
},
entry: {
main: [
'./src/main'
]
},
output: {
path: path.join(__dirname, 'build'),
filename: 'bundle.js'
},
plugins: [
new AureliaWebpackPlugin({
includeSubModules: [
{
moduleId: 'aurelia-dialog'
}
]
}),
new ProvidePlugin(
{
$: "jquery",
jQuery: "jquery",
"window.jQuery": 'jquery',
Promise: 'bluebird'
})
],
module: {
loaders: [
{ test: /\.css?$/, loader: 'style!css', exclude: /aurelia-dialog/ },
{ test: /\.css?$/, loader: 'raw', include: /aurelia-dialog/ },
{ test: /\.ts$/, loader: 'ts-loader' },
{ test: /\.html$/, loader: 'raw' },
{ test: /\.(png|gif|jpg|ico)$/, loader: 'url-loader?limit=8192' },
{ test: /\.woff2(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: 'url-loader?limit=10000&minetype=application/font-woff2' },
{ test: /\.woff(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: 'url-loader?limit=10000&minetype=application/font-woff' },
{ test: /\.(ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: 'file-loader' }
]
},
node: {
fs: "empty"
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment