mirror of
https://codeberg.org/demostf/tf-demos-viewer.git
synced 2026-06-03 18:14:11 +02:00
set target
This commit is contained in:
parent
42ccc9afd5
commit
41dce2b97e
3 changed files with 4 additions and 4 deletions
|
|
@ -17,7 +17,8 @@ opt-level = 3 # demo parsing is slow
|
|||
lto = true
|
||||
|
||||
[package.metadata.wasm-pack.profile.release]
|
||||
wasm-opt = ["-Oz", "--enable-mutable-globals"]
|
||||
wasm-opt = false
|
||||
#wasm-opt = ["-Oz", "--enable-mutable-globals"]
|
||||
|
||||
[features]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {FlatState, XY} from '../pkg/tf_demos_viewer.d.ts';
|
||||
import {FlatState, XY} from '../pkg/tf_demos_viewer';
|
||||
|
||||
export async function parseDemo(bytes: Uint8Array): Promise<ParsedDemo> {
|
||||
let m = await import("../pkg/tf_demos_viewer.js");
|
||||
|
|
|
|||
|
|
@ -5,15 +5,14 @@ const WasmPackPlugin = require("@wasm-tool/wasm-pack-plugin");
|
|||
const dist = path.resolve(__dirname, "dist");
|
||||
|
||||
module.exports = {
|
||||
target: 'webworker',
|
||||
mode: "production",
|
||||
entry: {
|
||||
test: "./js/test.ts",
|
||||
index: "./js/index.ts"
|
||||
},
|
||||
output: {
|
||||
path: dist,
|
||||
filename: "[name].js",
|
||||
globalObject: "this",
|
||||
libraryTarget: 'commonjs'
|
||||
},
|
||||
devServer: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue