mirror of
https://codeberg.org/demostf/edit.git
synced 2026-10-01 07:34:05 +02:00
js bindings
This commit is contained in:
parent
842a01e52d
commit
beb9bf3aa2
18 changed files with 7985 additions and 6186 deletions
38
webpack.config.js
Normal file
38
webpack.config.js
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
const path = require("path");
|
||||
const CopyPlugin = require("copy-webpack-plugin");
|
||||
const WasmPackPlugin = require("@wasm-tool/wasm-pack-plugin");
|
||||
|
||||
const dist = path.resolve(__dirname, "dist");
|
||||
|
||||
module.exports = {
|
||||
target: 'webworker',
|
||||
mode: "production",
|
||||
entry: {
|
||||
index: "./js/index.ts"
|
||||
},
|
||||
output: {
|
||||
path: dist,
|
||||
filename: "[name].js",
|
||||
libraryTarget: 'commonjs'
|
||||
},
|
||||
devServer: {
|
||||
contentBase: dist,
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.tsx', '.ts', '.js'],
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.tsx?$/,
|
||||
use: 'ts-loader',
|
||||
exclude: /node_modules|pkg/,
|
||||
},
|
||||
],
|
||||
},
|
||||
plugins: [
|
||||
new WasmPackPlugin({
|
||||
crateDirectory: __dirname,
|
||||
}),
|
||||
]
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue