1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
// SPDX-License-Identifier: GPL-2.0-only
const path = require("path");
const { LicenseWebpackPlugin } = require("license-webpack-plugin");
module.exports = {
entry: "./page.ts",
devtool: "source-map",
module: {
rules: [
{ test: /\.ts$/i, use: "ts-loader" },
{ test: /\.css$/i, use: ["style-loader", "css-loader"] },
{ test: /\.(woff|woff2|eot|ttf|otf)$/i, type: "asset/resource" },
{
test: /\.json$/i,
use: "file-loader?name=[name].[ext]",
type: "javascript/auto",
},
],
},
plugins: [new LicenseWebpackPlugin({ stats: { warnings: false } })],
output: {
path: path.resolve(__dirname, "dist"),
filename: "page.js",
},
};
|