Skip to content

Setting output path produces a different compilation output #2527

Open
@Wdestroier

Description

@Wdestroier

Hi!

If I compile and bundle the app by setting the --output flag with

webdev build --output "./test/"
[INFO] Reading cached asset graph completed, took 167ms
[INFO] Checking for updates since last build completed, took 595ms
[INFO] Running build completed, took 123ms
[INFO] Caching finalized dependency graph completed, took 140ms
[INFO] Creating merged output dir ./test completed, took 302ms
[INFO] Writing asset manifest completed, took 2ms
[INFO] Succeeded after 598ms with 0 outputs (0 actions)

then the generated output in the ./test/ directory is the following:

image

Notice the compiled app is in the ./test/web/ directory.

However, when the output flag is not set:

webdev build
[INFO] Reading cached asset graph completed, took 162ms
[INFO] Checking for updates since last build completed, took 648ms
[INFO] Running build completed, took 122ms
[INFO] Caching finalized dependency graph completed, took 145ms
[INFO] Creating merged output dir build completed, took 281ms
[INFO] Writing asset manifest completed, took 1ms
[INFO] Succeeded after 573ms with 0 outputs (0 actions)

the following output is generated in the ./build/ directory:

image

Notice the ./web/ directory doesn't exist, its contents are mixed with other build files.

Shouldn't both versions produce the same output? The output directory should not contain temporary build files we need to manually separate (.dart_tool?). It should contain all required files to deploy the app (index.html, main.dart.js, ...).

Metadata

Metadata

Assignees

Labels

P2A bug or feature request we're likely to work onpackage:webdevtriaged

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions