73 lines
1.7 KiB
JavaScript
73 lines
1.7 KiB
JavaScript
/*
|
|
* Copyright (c) 2020. Antonio Martinez Casadesus and Pascal Syma.
|
|
* All rights reserved.
|
|
*/
|
|
|
|
const webpack = require("webpack");
|
|
const path = require("path");
|
|
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
|
const {CleanWebpackPlugin} = require("clean-webpack-plugin");
|
|
const FaviconsWebpackPlugin = require('favicons-webpack-plugin');
|
|
|
|
module.exports = {
|
|
mode: "development",
|
|
devtool: "eval-source-map",
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.js$/,
|
|
exclude: /node_modules/,
|
|
use: {
|
|
loader: "babel-loader"
|
|
}
|
|
},
|
|
{
|
|
test: [/\.vert$/, /\.frag$/],
|
|
use: "raw-loader"
|
|
},
|
|
{
|
|
test: /\.(ogg|mp3|wav|mpe?g|gif|png|jpe?g|svg|xml)$/i,
|
|
use: "file-loader"
|
|
}
|
|
]
|
|
},
|
|
plugins: [
|
|
new CleanWebpackPlugin({
|
|
root: path.resolve(__dirname, "../")
|
|
}),
|
|
new webpack.DefinePlugin({
|
|
CANVAS_RENDERER: JSON.stringify(true),
|
|
WEBGL_RENDERER: JSON.stringify(true)
|
|
}),
|
|
new HtmlWebpackPlugin({
|
|
template: "./index.html"
|
|
}),
|
|
new FaviconsWebpackPlugin({
|
|
logo: './public/favicon.png',
|
|
publicPath: "./",
|
|
favicons: {
|
|
manifestRelativePaths: true,
|
|
start_url: "../",
|
|
appName: 'MI2Mario',
|
|
appDescription: 'MI2 Mario',
|
|
appShortName: "mi2mario",
|
|
developerName: 'Pascal Syma',
|
|
developerURL: "https://syma.dev",
|
|
background: '#000',
|
|
theme_color: '#333',
|
|
logging: true,
|
|
icons: {
|
|
android: true,
|
|
appleIcon: true,
|
|
appleStartup: true,
|
|
coast: true,
|
|
favicons: true,
|
|
firefox: true,
|
|
windows: true,
|
|
yandex: true
|
|
}
|
|
}
|
|
})
|
|
]
|
|
};
|