monorepo/kifu/kifu-pwa/webpack.config.js

28 lines
655 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" }
]
})
],
resolve: {
extensions: ['.ts'],
}
}