'Extract single Component (with dependencies) from nuxt (2)

Is it possible to build single component libraries from a nuxt project like you do with vue-cli-service build --mode production --target lib ... in vue?

I installed vue-cli-service as dev-dependency (into my nuxt project) and ran:

vue-cli-service build --mode production --target lib --name <lib-name> </path/to/Component>

If I run it without any additional configuration, the build failed with:

Error: Compiling RuleSet failed: Unexpected property test in condition (at ruleSet[1].rules[1].resource.test: resource => {
        currentResource = resource
        return true


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source