diff options
Diffstat (limited to 'webpack.config.js')
-rw-r--r-- | webpack.config.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/webpack.config.js b/webpack.config.js new file mode 100644 index 0000000..90dfeb6 --- /dev/null +++ b/webpack.config.js @@ -0,0 +1,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", + }, +}; |