Skip to content

Commit

Permalink
feat: web 빌드 기능
Browse files Browse the repository at this point in the history
  • Loading branch information
aengzu committed Aug 13, 2024
1 parent 034d918 commit 6d04b91
Show file tree
Hide file tree
Showing 7 changed files with 9,813 additions and 17 deletions.
1 change: 1 addition & 0 deletions lib/di/locator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ Future<void> setupLocator() async {
_setupUseCases();
_setupViewModels();


final database = await _setupDatabase();
await _initializeDatabase(database.characterDao, database.mindsetDao);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import 'di/locator.dart';

Future<void> main() async {
await dotenv.load(fileName: "lib/config/.env");
setupLocator();
await setupLocator(); // await 추가
runApp(const MyApp());
}

Expand Down
2 changes: 1 addition & 1 deletion pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,7 @@ packages:
source: hosted
version: "2.3.3"
sqflite_common_ffi_web:
dependency: transitive
dependency: "direct main"
description:
name: sqflite_common_ffi_web
sha256: e9d1cb35a5ff7c43072968ed734e0a1a859564fd2b2c8654e0c6244a57dc82a8
Expand Down
1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ dependencies:
floor: ^1.5.0
floor_generator: ^1.5.0
sqflite: ^2.3.3+1
sqflite_common_ffi_web: ^0.4.4

dev_dependencies:
flutter_test:
Expand Down
20 changes: 5 additions & 15 deletions web/index.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<!--
If you are serving your web app in a path other than the root, change the
href value below to reflect the base path you are serving from.
The path provided below has to start and end with a slash "/" in order for
it to work correctly.
For more details:
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
This is a placeholder for base href that will be replaced by the value of
the `--base-href` argument provided to `flutter build`.
-->
<base href="https://palink-v2.web.app/">
<base href="/">

<meta charset="UTF-8">
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
Expand All @@ -31,8 +18,11 @@

<title>palink_v2</title>
<link rel="manifest" href="manifest.json">

<!-- Add the sqflite_sw.js script -->
<script src="sqflite/sqflite_sw.js"></script>
</head>
<body>
<script src="flutter_bootstrap.js" async></script>
<script src="flutter_bootstrap.js" async></script>
</body>
</html>
Loading

0 comments on commit 6d04b91

Please sign in to comment.