Harrison Deng
7917565438
Added website title. Added Unavailability message to steam page. Added image lossy image minimizers to webpack to production webpack configuration. Added source mapping to development webpack configuration. Renamed router paths.
79 lines
2.1 KiB
JavaScript
79 lines
2.1 KiB
JavaScript
const path = require("path");
|
|
const { VueLoaderPlugin } = require("vue-loader");
|
|
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
|
|
|
module.exports = {
|
|
entry: path.resolve("./src/main.js"),
|
|
output: {
|
|
filename: "[name].bundle.js",
|
|
path: path.resolve("./dist"),
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.vue$/,
|
|
loader: "vue-loader",
|
|
},
|
|
{
|
|
test: /\.css$/i,
|
|
use: ["style-loader", "css-loader"],
|
|
},
|
|
{
|
|
test: /\.s[ac]ss$/i,
|
|
use: [
|
|
"vue-style-loader",
|
|
"css-loader",
|
|
{
|
|
loader: "sass-loader",
|
|
options: {
|
|
sassOptions: {
|
|
}
|
|
}
|
|
},
|
|
],
|
|
},
|
|
{
|
|
test: /\.js$/,
|
|
exclude: file => (
|
|
/node_modules/.test(file) &&
|
|
!/\.vue\.js/.test(file)
|
|
),
|
|
use: {
|
|
loader: "babel-loader",
|
|
options: {
|
|
presets: ["@babel/preset-env"]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
test: /\.m?js$/,
|
|
exclude: /(node_modules|bower_components)/,
|
|
use: {
|
|
loader: "babel-loader",
|
|
options: {
|
|
presets: ["@babel/preset-env"]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
test: /\.(woff|woff2|eot|ttf|otf)$/i,
|
|
type: "asset/resource",
|
|
},
|
|
{
|
|
test: /\.(jpe?g|png|gif|svg)$/i,
|
|
type: "asset",
|
|
}
|
|
]
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "src/")
|
|
},
|
|
},
|
|
plugins: [
|
|
new HtmlWebpackPlugin({
|
|
title: "Reslate SE"
|
|
}),
|
|
new VueLoaderPlugin(),
|
|
]
|
|
}; |