Skip to content

Commit

Permalink
fix: optimised wasm file size (#222)
Browse files Browse the repository at this point in the history
  • Loading branch information
sauraww committed Sep 5, 2024
1 parent 929bcc5 commit 670d44d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 2 additions & 0 deletions crates/superposition/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use actix_web::dev::Service;
use actix_web::middleware::Compress;
use actix_web::web::PathConfig;
use actix_web::HttpMessage;
use actix_web::{web, web::get, web::scope, web::Data, App, HttpResponse, HttpServer};
Expand Down Expand Up @@ -155,6 +156,7 @@ async fn main() -> Result<()> {
let leptos_envs = ui_envs.clone();
let cac_host = cac_host.to_owned() + base.as_str();
App::new()
.wrap(Compress::default())
.wrap_fn(|req, srv| {
let user = User::default();
req.extensions_mut().insert::<User>(user);
Expand Down
15 changes: 14 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
network_mode: bridge

localstack:
build : ./docker-compose/localstack/
build: ./docker-compose/localstack/
container_name: superposition_localstack
ports:
- "4510-4559:4510-4559" # external service port range
Expand All @@ -24,3 +24,16 @@ services:
LOCALSTACK_SERVICES: s3, sns, sqs, logs, cloudwatch, kms
AWS_DEFAULT_REGION: ap-south-1
EDGE_PORT: 4566

# app:
# image: superposition_github:latest
# container_name: superposition_app
# ports:
# - "8080:8080"
# env_file:
# - .env
# depends_on:
# - postgres
# - localstack
# network_mode: bridge
# restart: on-failure
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ superposition_dev:

frontend:
cd crates/frontend && \
wasm-pack build --target=web --debug --no-default-features --features=hydrate
wasm-pack build --target web --dev --no-default-features --features hydrate
cd crates/frontend && \
npx tailwindcss -i ./styles/tailwind.css -o ./pkg/style.css
-rm -rf target/site
Expand Down

0 comments on commit 670d44d

Please sign in to comment.