-
Notifications
You must be signed in to change notification settings - Fork 12k
ng build doesn't create worker file #21431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Can you provide an example of what you are describing in regards to " |
We have 2 projects. First is main project, second is a part of the main project. And second project builds via |
I suspect this is related to #21432 (comment), can you confirm that you are using |
I don't use deployUrl, I just run |
Can you please provide the fullest of options of the build target? In the screenshot above you only provided a sub-set of options. if you are indeed not using deployUrl, we’d require a minimal reproduction. You can read here why this is needed. A good way to make a minimal repro is to create a new app via |
That code structure is required by Webpack to process WebWorkers. For additional information, please see https://webpack.js.org/guides/web-workers/ |
Thanks) |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Hi,
I have a problem with a web worker. I started updating the app from version 9 to version 12. I have updated the file where the worker was declared,
Angular 9
new worker ('./ worker / db-worker.worker', {type: 'module'});
Angular 12 after ng update
new worker (new url ('./ worker / db-worker.worker', import.meta.url), {type: 'module'});
Now when I run ng build, a separate file for
worker
is created, as it actually was before (only with a different name, well, that's another question).Now there is
localhost
in the beginning, but I don't need it.But if you remove import.meta.url, then the file won't be built.
How to build the working file without import.meta.url(localhost)?
Angular CLI: 12.1.3
Node: 14.15.0
Package Manager: npm 6.14.8
OS: win32 x64
Angular: 12.1.3
... animations, cdk, cli, common, compiler, compiler-cli, core
... elements, forms, language-service, localize
... platform-browser, platform-browser-dynamic, router
Package Version
@angular-devkit/architect 0.1201.3
@angular-devkit/build-angular 12.1.3
@angular-devkit/core 12.1.3
@angular-devkit/schematics 12.1.3
@schematics/angular 12.1.3
rxjs 6.5.5
typescript 4.3.5
The text was updated successfully, but these errors were encountered: