2020-03-30 12:19:54 +02:00
|
|
|
var theme = '../themes/MetroMumbleLight'
|
2020-03-30 10:36:57 +02:00
|
|
|
var path = require('path');
|
2016-11-27 17:43:59 +01:00
|
|
|
|
|
|
|
module.exports = {
|
2020-03-30 10:36:57 +02:00
|
|
|
mode: 'development',
|
2018-09-23 17:10:11 +02:00
|
|
|
entry: {
|
|
|
|
index: [
|
|
|
|
'./app/index.js',
|
|
|
|
'./app/index.html'
|
|
|
|
],
|
2020-03-30 12:30:07 +02:00
|
|
|
config: './app/config.js',
|
|
|
|
theme: './app/theme.js',
|
|
|
|
matrix: './app/matrix.js'
|
2018-09-23 17:10:11 +02:00
|
|
|
},
|
2016-11-27 17:43:59 +01:00
|
|
|
output: {
|
2020-03-30 10:36:57 +02:00
|
|
|
path: path.join(__dirname, 'dist'),
|
|
|
|
filename: '[name].js'
|
2016-11-27 17:43:59 +01:00
|
|
|
},
|
|
|
|
module: {
|
2020-03-30 10:36:57 +02:00
|
|
|
rules: [
|
2016-11-27 17:43:59 +01:00
|
|
|
{
|
|
|
|
test: /\.js$/,
|
|
|
|
exclude: /node_modules/,
|
2020-03-30 10:36:57 +02:00
|
|
|
use: {
|
|
|
|
loader: 'babel-loader',
|
|
|
|
options: {
|
|
|
|
presets: ['@babel/preset-env'],
|
|
|
|
plugins: ['@babel/plugin-transform-runtime']
|
|
|
|
}
|
2016-11-27 17:43:59 +01:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.html$/,
|
2020-03-30 10:36:57 +02:00
|
|
|
use: [
|
2020-03-30 12:19:54 +02:00
|
|
|
{
|
|
|
|
loader: 'file-loader',
|
|
|
|
options: { 'name': '[name].[ext]' }
|
|
|
|
},
|
|
|
|
{
|
|
|
|
loader: "extract-loader"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
loader: 'html-loader',
|
|
|
|
options: {
|
|
|
|
attrs: ['img:src', 'link:href'],
|
|
|
|
//interpolate: 'require',
|
|
|
|
root: theme
|
|
|
|
}
|
|
|
|
}
|
2016-11-27 17:43:59 +01:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.css$/,
|
2020-03-30 10:36:57 +02:00
|
|
|
use: [
|
2016-11-27 17:43:59 +01:00
|
|
|
'file-loader',
|
|
|
|
'extract-loader',
|
|
|
|
'css-loader'
|
|
|
|
]
|
|
|
|
},
|
2020-03-30 12:30:07 +02:00
|
|
|
{
|
|
|
|
test: /\.scss$/,
|
|
|
|
use: [
|
|
|
|
'file-loader?name=[hash].css',
|
|
|
|
'extract-loader',
|
|
|
|
'css-loader',
|
|
|
|
'sass-loader'
|
|
|
|
]
|
|
|
|
},
|
2016-11-27 17:43:59 +01:00
|
|
|
{
|
2020-03-30 12:19:54 +02:00
|
|
|
type: 'javascript/auto',
|
2016-11-27 17:43:59 +01:00
|
|
|
test: /manifest\.json$|\.xml$/,
|
2020-03-30 10:36:57 +02:00
|
|
|
use: [
|
2016-11-27 17:43:59 +01:00
|
|
|
'file-loader',
|
|
|
|
'extract-loader',
|
2020-03-30 12:19:54 +02:00
|
|
|
{
|
|
|
|
loader: 'regexp-replace-loader',
|
|
|
|
options: {
|
|
|
|
match: {
|
|
|
|
pattern: "#require\\('([^']*)'\\)",
|
|
|
|
flags: 'g'
|
|
|
|
},
|
|
|
|
replaceWith: '"+require("$1")+"'
|
|
|
|
}
|
|
|
|
},
|
2016-11-27 17:43:59 +01:00
|
|
|
'raw-loader'
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2020-03-30 10:36:57 +02:00
|
|
|
test: /\.(svg|png|ico)$/,
|
|
|
|
use: [
|
|
|
|
'file-loader'
|
|
|
|
]
|
2016-11-27 17:43:59 +01:00
|
|
|
},
|
|
|
|
{
|
2020-03-30 10:36:57 +02:00
|
|
|
enforce: 'post',
|
|
|
|
test: /mumble-streams\/lib\/data.js/,
|
|
|
|
use: [
|
|
|
|
'transform-loader?brfs'
|
|
|
|
]
|
2016-11-27 17:43:59 +01:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
resolve: {
|
|
|
|
alias: {
|
2018-09-27 16:57:41 +02:00
|
|
|
webworkify: 'webworkify-webpack'
|
2016-11-27 17:43:59 +01:00
|
|
|
}
|
2020-03-30 10:36:57 +02:00
|
|
|
},
|
|
|
|
target: 'web'
|
2016-11-27 17:43:59 +01:00
|
|
|
}
|