monorepo/kifu/pwa/webpack.config.js

29 lines
700 B
JavaScript
Raw Permalink Normal View History

2023-05-07 17:13:20 +00:00
const CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = {
mode: "development",
entry: {
2023-05-10 13:42:02 +00:00
"kifu-bundle": "./src/main.ts",
2023-05-07 17:13:20 +00:00
sw: "./src/sw.js",
},
2023-05-11 13:39:31 +00:00
module: {
2023-05-07 17:13:20 +00:00
rules: [
2023-05-11 13:39:31 +00:00
{ test: /\.ts$/, use: "ts-loader", exclude: /node_modules/ },
2023-05-07 17:13:20 +00:00
{ test: /\.wasm$/, type: "asset/inline" }
],
},
plugins: [
new CopyWebpackPlugin({
patterns: [
{ from: "src/index.html" },
{ from: "src/kifu.css" },
2023-05-13 16:47:09 +00:00
{ from: "src/manifest.json" },
{ from: "src/icon512.png" }
2023-05-07 17:13:20 +00:00
]
})
2023-05-11 13:39:31 +00:00
],
resolve: {
extensions: ['.ts'],
}
2023-05-07 17:13:20 +00:00
}