2019-06-25 18:27:04 +00:00
|
|
|
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
2019-05-08 18:27:07 +00:00
|
|
|
const CopyWebpackPlugin = require("copy-webpack-plugin");
|
|
|
|
const WasmPackPlugin = require("@wasm-tool/wasm-pack-plugin");
|
|
|
|
const webpack = require('webpack');
|
|
|
|
const path = require('path');
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
entry: path.resolve(__dirname, "www/bootstrap.js"),
|
|
|
|
output: {
|
|
|
|
path: path.resolve(__dirname, "dist"),
|
2019-06-25 18:27:04 +00:00
|
|
|
filename: "index.js",
|
2019-05-08 18:27:07 +00:00
|
|
|
},
|
|
|
|
mode: "development",
|
|
|
|
plugins: [
|
2019-06-25 18:27:04 +00:00
|
|
|
new CleanWebpackPlugin(),
|
2019-05-08 18:27:07 +00:00
|
|
|
new CopyWebpackPlugin([{
|
|
|
|
from: path.resolve(__dirname, "www/index.html"),
|
|
|
|
to: "index.html"
|
|
|
|
}]),
|
|
|
|
new WasmPackPlugin({
|
2019-06-25 18:27:04 +00:00
|
|
|
crateDirectory: path.resolve(__dirname, ".."),
|
2019-05-08 18:27:07 +00:00
|
|
|
extraArgs: "--out-name=ruffle",
|
|
|
|
})
|
2019-06-25 18:27:04 +00:00
|
|
|
]
|
2019-05-08 18:27:07 +00:00
|
|
|
};
|