Argument --component-dir, "componentDir" in polymer.json is not being used, and components are not found if components are being installed in a directory other than node_modules.
polymer-cli: v1.9.11
Might be related: Polymer/tools#431
Steps to Reproduce
Any (third-party) components shall go into directory static; this will be the directory structure created in this example:
yarn install
# This will populate static/, which we want.
# yarn global add polymer-cli
~/.yarn/bin/polymer build
# error
Expected Results
polymer (polymer-cli) exits with code 0 (success), i. e. no errors.
Directories build/default/public and build/default/static do exist…
… build/default/static exists and contains the components, just like a node_modules would (which not using is the point here).
Actual Results
info: Clearing build/ directory...
debug: build config loaded:
…
file:///home/…/…/site/public/index.html(100,2) warning [cant-resolve-module-specifier] - Cannot resolve module specifier with resolution algorithm: node
Could not resolve module specifier "@polymer/paper-button/paper-button.js" in file "/home/…/…/site/public/index.html_script_1.js".
Specifically, although componentDir points to static/ and static/@polymer/ exists, the component does not get found because folder static is not considered when resolving.
Neither does changing the algorithm from node to none solve this, nor (in combination with) does toggling "npm": true to "npm": false.
Creating a symlink static ← node_modules is not what I want, because the output shall contain no node_modules by having set componentDir accordingly.
Argument
--component-dir
,"componentDir"
inpolymer.json
is not being used, and components are not found if components are being installed in a directory other thannode_modules
.Might be related: Polymer/tools#431
Steps to Reproduce
Any (third-party) components shall go into directory
static
; this will be the directory structure created in this example:This is
polymer.json
:.yarnrc
is:Let
package.json
be (excerpt):Create
public/index.html
with:Now execute:
Expected Results
polymer
(polymer-cli) exits with code 0 (success), i. e. no errors.build/default/public
andbuild/default/static
do exist…build/default/static
exists and contains the components, just like anode_modules
would (which not using is the point here).Actual Results
Specifically, although
componentDir
points tostatic/
andstatic/@polymer/
exists, the component does not get found because folderstatic
is not considered when resolving.Neither does changing the algorithm from
node
tonone
solve this, nor (in combination with) does toggling"npm": true
to"npm": false
.Creating a symlink
static ← node_modules
is not what I want, because the output shall contain nonode_modules
by having setcomponentDir
accordingly.