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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

The outdir in the config does not seem to work #47

Closed
hsablonniere opened this issue Jun 28, 2021 · 5 comments
Closed

The outdir in the config does not seem to work #47

hsablonniere opened this issue Jun 28, 2021 · 5 comments
Labels
good first issue Good for newcomers

Comments

@hsablonniere
Copy link
Contributor

hsablonniere commented Jun 28, 2021

Hey team 馃槈

I tried using outdir in my custom-elements-manifest.config.mjs but the file still gets generated at the default location. Using the CLI param works.

export default {
  globs: ['src/**/cc-*.js'],
  // Has no effect for now
  outdir: 'dist',
  plugins: [
  ],
};
@hsablonniere
Copy link
Contributor Author

Also, when I specify --outdir dist and dist does not exist, there's an ENOENT error.

@thepassle
Copy link
Member

Ah, its because the defaultValue of outdir (from the CLI options) is '', and CLI options override user config options;

    const mergedOptions = { ...userConfig, ...cliConfig };

And because outdir (from CLI options) has a value (''), I guess it overrides the user config option 馃う

@thepassle thepassle added the good first issue Good for newcomers label Jun 28, 2021
@thepassle
Copy link
Member

fixed in #49

@hsablonniere
Copy link
Contributor Author

馃 馃暫

@hsablonniere
Copy link
Contributor Author

@thepassle There is still an error if the directory does not exist:

Also, when I specify --outdir dist and dist does not exist, there's an ENOENT error.

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

No branches or pull requests

2 participants