mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
40 lines
1003 B
JavaScript
40 lines
1003 B
JavaScript
const path = require("path");
|
|
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
|
const CopyPlugin = require("copy-webpack-plugin");
|
|
|
|
module.exports = {
|
|
mode: "production",
|
|
entry: "./src/index.js",
|
|
output: {
|
|
filename: "script.js",
|
|
path: path.join(__dirname, "static/dist"),
|
|
},
|
|
target: "web",
|
|
plugins: [
|
|
new MiniCssExtractPlugin(),
|
|
new CopyPlugin({
|
|
patterns: [
|
|
{ from: "src/css/images", to: "images" },
|
|
{ from: "src/images/lorikeet", to: "images" },
|
|
],
|
|
}),
|
|
],
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.css$/i,
|
|
use: ["style-loader", "css-loader"],
|
|
},
|
|
{
|
|
test: /\.(png|jpg|jpeg|gif|svg|woff|woff2|ttf|eot)(\?.*$|$)/,
|
|
use: {
|
|
loader: "file-loader",
|
|
},
|
|
},
|
|
],
|
|
},
|
|
performance: {
|
|
hints: false,
|
|
},
|
|
};
|