mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-02 14:51:15 +00:00

We're running into https://github.com/parcel-bundler/parcel/issues/1573 so switch back to webpack.
23 lines
613 B
JavaScript
23 lines
613 B
JavaScript
const path = require("path");
|
|
const WasmPackPlugin = require("@wasm-tool/wasm-pack-plugin");
|
|
const CopyPlugin = require("copy-webpack-plugin");
|
|
const dist = path.resolve(__dirname, "dist");
|
|
|
|
module.exports = {
|
|
mode: "production",
|
|
entry: { index: "./index.js" },
|
|
output: { path: dist, filename: "[name].js" },
|
|
devServer: {
|
|
contentBase: dist,
|
|
},
|
|
plugins: [
|
|
new CopyPlugin({
|
|
patterns: [
|
|
{ from: path.resolve(__dirname, "static") },
|
|
],
|
|
}),
|
|
new WasmPackPlugin({
|
|
crateDirectory: __dirname,
|
|
}),
|
|
]
|
|
};
|