Skip to content
This repository has been archived by the owner on Dec 12, 2020. It is now read-only.

fix: add Example cli TypeScript project #356

Merged
merged 5 commits into from
Jul 10, 2020
Merged

fix: add Example cli TypeScript project #356

merged 5 commits into from
Jul 10, 2020

Conversation

bahmutov
Copy link
Contributor

@bahmutov bahmutov commented Jul 10, 2020

To solve

  • fix the failure to transpile

In the root folder

npm install
npm run build

In folder example/cli-ts

npm install
DEBUG=cypress-vue-unit-test npm run cy:run

Oops...we found an error preparing this test file:

  src/components/HelloWorld.spec.ts

The error was:

Error: [VueLoaderPlugin Error] No matching use for vue-loader is found.
Make sure the rule matching .vue files include vue-loader in its use.

Screen Shot 2020-07-10 at 2 49 54 PM

@bahmutov bahmutov mentioned this pull request Jul 10, 2020
@bahmutov
Copy link
Contributor Author

I have disabled adding Babel loader (needed for import mocking, code instrumentation) and it seems to solve the issue

webpackOptions.mode = 'development'
  inlineUrlLoadedAssets(webpackOptions)
  preventChunking(webpackOptions)
  compileTemplate(webpackOptions)
  // insertBabelLoader(config, webpackOptions)
  if (debug.enabled) {
    console.error('final webpack')
    console.error(util_1.default.inspect(webpackOptions, false, 10, true))
  }

So we probably need to better modify the Webpack options

@bahmutov
Copy link
Contributor Author

ughh, got through the failure by correctly detecting VueLoaderPlugin already present. The code transpiles while in cypress open mode, but the support file keeps hanging in cypress run mode

Will open a separate issue

@bahmutov bahmutov marked this pull request as ready for review July 10, 2020 20:29
@bahmutov bahmutov changed the title Add Example cli TypeScript project fix: add Example cli TypeScript project Jul 10, 2020
@bahmutov bahmutov merged commit c0b2bb3 into master Jul 10, 2020
@bahmutov
Copy link
Contributor Author

🎉 This PR is included in version 3.4.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

JessicaSachs pushed a commit to cypress-io/cypress that referenced this pull request Sep 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Noticed double VueLoaderPlugin
1 participant