mirror of https://github.com/AMT-Cheif/drift.git
Fix build config for web worker example
This commit is contained in:
parent
440753d5e3
commit
4fae017d36
|
@ -1,16 +1,31 @@
|
||||||
targets:
|
targets:
|
||||||
# We use dartdevc by default, but the worker should always be compiled with dart2js
|
# This setup exists so that the main entrypoint (web/main.dart) gets compiled
|
||||||
|
# with dartdevc for debug builds while the worker is compiled with dart2js
|
||||||
|
# (since workers don't support the JS moduled emitted by dartdevc).
|
||||||
|
# In release builds (`--release` on the CLI), both entrypoints are compiled
|
||||||
|
# with dart2js.
|
||||||
|
#
|
||||||
|
# If you're ok with compiling everything with dart2js, just use
|
||||||
|
# `compiler: dartj2s` on the options of the default target and ignore the two
|
||||||
|
# additional targets here.
|
||||||
|
dart2js_archives:
|
||||||
|
auto_apply_builders: false
|
||||||
|
dependencies: [":$default", ":worker"]
|
||||||
|
builders:
|
||||||
|
build_web_compilers:dart2js_archive_extractor:
|
||||||
|
enabled: true
|
||||||
worker:
|
worker:
|
||||||
auto_apply_builders: false
|
auto_apply_builders: false
|
||||||
dependencies: [":$default"]
|
dependencies: [":$default"]
|
||||||
builders:
|
builders:
|
||||||
build_web_compilers|entrypoint:
|
build_web_compilers:entrypoint:
|
||||||
enabled: true
|
enabled: true
|
||||||
generate_for:
|
generate_for:
|
||||||
- web/worker.dart
|
- web/worker.dart
|
||||||
options:
|
options:
|
||||||
compiler: dart2js
|
compiler: dart2js
|
||||||
|
build_web_compilers:dart2js_archive_extractor:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
$default:
|
$default:
|
||||||
builders:
|
builders:
|
||||||
|
@ -22,8 +37,11 @@ targets:
|
||||||
generate_values_in_copy_with: true
|
generate_values_in_copy_with: true
|
||||||
named_parameters: true
|
named_parameters: true
|
||||||
new_sql_code_generation: true
|
new_sql_code_generation: true
|
||||||
build_web_compilers|entrypoint:
|
build_web_compilers:entrypoint:
|
||||||
generate_for:
|
generate_for:
|
||||||
# This one is compiled in the other target
|
# This one is compiled in the other target
|
||||||
exclude:
|
exclude:
|
||||||
- "web/worker.dart"
|
- "web/worker.dart"
|
||||||
|
# We have a designated target for this step.
|
||||||
|
build_web_compilers:dart2js_archive_extractor:
|
||||||
|
enabled: false
|
||||||
|
|
|
@ -166,8 +166,6 @@ class Entries extends Table with TableInfo<Entries, Entrie> {
|
||||||
@override
|
@override
|
||||||
Set<GeneratedColumn> get $primaryKey => {id};
|
Set<GeneratedColumn> get $primaryKey => {id};
|
||||||
@override
|
@override
|
||||||
List<Set<GeneratedColumn>> get uniqueKeys => [];
|
|
||||||
@override
|
|
||||||
Entrie map(Map<String, dynamic> data, {String? tablePrefix}) {
|
Entrie map(Map<String, dynamic> data, {String? tablePrefix}) {
|
||||||
return Entrie.fromData(data,
|
return Entrie.fromData(data,
|
||||||
prefix: tablePrefix != null ? '$tablePrefix.' : null);
|
prefix: tablePrefix != null ? '$tablePrefix.' : null);
|
||||||
|
|
Loading…
Reference in New Issue