Skip to content
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

with webpack bundle optimization, Composer.compile fails #67

Open
starpit opened this issue Jan 29, 2020 · 1 comment
Open

with webpack bundle optimization, Composer.compile fails #67

starpit opened this issue Jan 29, 2020 · 1 comment

Comments

@starpit
Copy link
Contributor

starpit commented Jan 29, 2020

the terser webpack bundle optimizer by default renames javascript classes. as a result, composer.compile fails with

Invalid argument "task" in "task" combinator
Argument value: m {
  '.combinator': [Function: .combinator],
  type: 'action',
  name: '/_/authenticate',
  path: '.test'
}

for now, a workaround is to set keep_classnames: true in the terserOptions passed to the terser webpack plugin constructor.

@starpit
Copy link
Contributor Author

starpit commented Jan 29, 2020

some extra info: the task interpretation expects these two to yield the same value:

> task.constructor.name
"m"
> Composition.name
"Composition"

i suspect that this is testable outside of webpack, by using the terser npm directly; i think composer already uses it, for the conductor code. so a test would be to apply it to the composer code, as well, and verify that the tests still pass?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant