2016-11-27 17:43:59 +01:00
|
|
|
var theme = 'MetroMumbleLight'
|
|
|
|
|
|
|
|
var path = require('path')
|
|
|
|
|
|
|
|
module.exports = {
|
2018-09-23 17:10:11 +02:00
|
|
|
entry: {
|
|
|
|
index: [
|
|
|
|
'./app/index.js',
|
|
|
|
'./app/index.html'
|
|
|
|
],
|
2018-09-23 23:35:42 +02:00
|
|
|
theme: './app/theme.js',
|
2018-09-23 17:10:11 +02:00
|
|
|
matrix: './app/matrix.js'
|
|
|
|
},
|
2016-11-27 17:43:59 +01:00
|
|
|
output: {
|
2018-09-23 17:10:11 +02:00
|
|
|
filename: '[name].js',
|
2016-11-27 17:43:59 +01:00
|
|
|
path: './dist'
|
|
|
|
},
|
|
|
|
module: {
|
|
|
|
postLoaders: [
|
|
|
|
{
|
|
|
|
include: /mumble-streams\/lib\/data.js/,
|
|
|
|
loader: 'transform-loader?brfs'
|
|
|
|
}
|
|
|
|
],
|
|
|
|
loaders: [
|
|
|
|
{
|
|
|
|
test: /\.js$/,
|
|
|
|
exclude: /node_modules/,
|
|
|
|
loader: 'babel-loader',
|
|
|
|
query: {
|
|
|
|
presets: ['es2015'],
|
|
|
|
plugins: ['transform-runtime']
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.html$/,
|
|
|
|
loaders: [
|
|
|
|
'file-loader?name=[name].[ext]',
|
|
|
|
'extract-loader',
|
|
|
|
'html-loader?' + JSON.stringify({
|
|
|
|
attrs: ['img:src', 'link:href'],
|
|
|
|
interpolate: 'require',
|
|
|
|
root: theme
|
|
|
|
})
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.css$/,
|
|
|
|
loaders: [
|
|
|
|
'file-loader',
|
|
|
|
'extract-loader',
|
|
|
|
'css-loader'
|
|
|
|
]
|
|
|
|
},
|
2018-09-23 23:35:42 +02:00
|
|
|
{
|
|
|
|
test: /\.scss$/,
|
|
|
|
loaders: [
|
|
|
|
'file-loader?name=[hash].css',
|
|
|
|
'extract-loader',
|
|
|
|
'css-loader',
|
|
|
|
'sass-loader'
|
|
|
|
]
|
|
|
|
},
|
2016-11-27 17:43:59 +01:00
|
|
|
{
|
|
|
|
test: /manifest\.json$|\.xml$/,
|
|
|
|
loaders: [
|
|
|
|
'file-loader',
|
|
|
|
'extract-loader',
|
|
|
|
'regexp-replace-loader?' + JSON.stringify({
|
|
|
|
match: {
|
|
|
|
pattern: "#require\\('([^']*)'\\)",
|
|
|
|
flags: 'g'
|
|
|
|
},
|
|
|
|
replaceWith: '"+require("$1")+"'
|
|
|
|
}),
|
|
|
|
'raw-loader'
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.json$/,
|
|
|
|
exclude: /manifest\.json$/,
|
|
|
|
loader: 'json-loader'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.(svg|png|ico)$/,
|
|
|
|
loader: 'file-loader'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
resolve: {
|
|
|
|
alias: {
|
2018-09-27 16:57:41 +02:00
|
|
|
webworkify: 'webworkify-webpack'
|
2016-11-27 17:43:59 +01:00
|
|
|
},
|
|
|
|
root: [
|
|
|
|
path.resolve('./themes/')
|
|
|
|
]
|
|
|
|
},
|
|
|
|
includes: {
|
|
|
|
pattern: function (filepath) {
|
|
|
|
return {
|
|
|
|
re: /#require\((.+)\)/,
|
|
|
|
index: 1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|