monorepo/kifu/pwa/webpack.config.js

29 lines
700 B
JavaScript

const CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = {
mode: "development",
entry: {
"kifu-bundle": "./src/main.ts",
sw: "./src/sw.js",
},
module: {
rules: [
{ test: /\.ts$/, use: "ts-loader", exclude: /node_modules/ },
{ test: /\.wasm$/, type: "asset/inline" }
],
},
plugins: [
new CopyWebpackPlugin({
patterns: [
{ from: "src/index.html" },
{ from: "src/kifu.css" },
{ from: "src/manifest.json" },
{ from: "src/icon512.png" }
]
})
],
resolve: {
extensions: ['.ts'],
}
}