10 changed files with 30 additions and 57 deletions
@ -0,0 +1,16 @@ |
|||
require("esbuild").build({ |
|||
entryPoints: [ |
|||
"./modules/Avalonia.ts", |
|||
"./modules/Storage.ts" |
|||
], |
|||
outdir: "../wwwroot", |
|||
bundle: true, |
|||
minify: true, |
|||
format: "esm", |
|||
target: "es2016", |
|||
platform: "browser", |
|||
sourcemap: "linked", |
|||
loader: {".ts": "ts"} |
|||
}) |
|||
.then(() => console.log("⚡ Done")) |
|||
.catch(() => process.exit(1)); |
|||
@ -0,0 +1,5 @@ |
|||
export { DpiWatcher } from "./Avalonia/DpiWatcher" |
|||
export { InputHelper } from "./Avalonia/InputHelper" |
|||
export { NativeControlHost } from "./Avalonia/NativeControlHost" |
|||
export { SizeWatcher } from "./Avalonia/SizeWatcher" |
|||
export { SKHtmlCanvas } from "./Avalonia/SKHtmlCanvas" |
|||
@ -1,5 +0,0 @@ |
|||
export { DpiWatcher } from "./DpiWatcher" |
|||
export { InputHelper } from "./InputHelper" |
|||
export { NativeControlHost } from "./NativeControlHost" |
|||
export { SizeWatcher } from "./SizeWatcher" |
|||
export { SKHtmlCanvas } from "./SKHtmlCanvas" |
|||
@ -0,0 +1 @@ |
|||
export { StorageProvider } from "./Storage/StorageProvider" |
|||
@ -1,16 +1,13 @@ |
|||
{ |
|||
"name": "avalonia.web", |
|||
"scripts": { |
|||
"dist": "cross-env NODE_ENV=production webpack", |
|||
"build": "cross-env NODE_ENV=development webpack" |
|||
"prebuild": "tsc -noEmit", |
|||
"build": "node build.js" |
|||
}, |
|||
"devDependencies": { |
|||
"@types/emscripten": "^1.39.6", |
|||
"@types/wicg-file-system-access": "^2020.9.5", |
|||
"cross-env": "^7.0.3", |
|||
"ts-loader": "^9.3.1", |
|||
"typescript": "^4.7.4", |
|||
"webpack": "^5.73.0", |
|||
"webpack-cli": "^4.10.0" |
|||
"esbuild": "^0.15.7" |
|||
} |
|||
} |
|||
|
|||
@ -1,40 +0,0 @@ |
|||
const path = require('path'); |
|||
const prod = process.env.NODE_ENV == 'production'; |
|||
|
|||
module.exports = { |
|||
mode: prod ? "production" : "development", |
|||
devtool: 'source-map', |
|||
target: ["web", "es2020"], |
|||
entry: { |
|||
avalonia: './modules/Avalonia/Avalonia.ts', |
|||
avaloniaStorage: { |
|||
import: './modules/Storage/StorageProvider.ts', |
|||
dependOn: 'avalonia', |
|||
} |
|||
}, |
|||
output: { |
|||
filename: '[name].js', |
|||
path: path.resolve(__dirname, '../wwwroot'), |
|||
library: { |
|||
type: 'module', |
|||
}, |
|||
}, |
|||
module: { |
|||
rules: [ |
|||
{ |
|||
test: /\.tsx?$/, |
|||
use: 'ts-loader', |
|||
exclude: /node_modules/, |
|||
}, |
|||
], |
|||
}, |
|||
resolve: { |
|||
extensions: ['.ts', '.js'], |
|||
}, |
|||
optimization: { |
|||
minimize: false |
|||
}, |
|||
experiments: { |
|||
outputModule: true, |
|||
} |
|||
}; |
|||
Loading…
Reference in new issue