ardatan / meteor-webpack

https://medium.com/@ardatan/meteor-with-webpack-in-2018-faster-compilation-better-source-handling-benefit-from-bc5ccc5735ef
MIT License
123 stars 29 forks source link

Working with tests? #38

Closed alexpricedev closed 5 years ago

alexpricedev commented 6 years ago

I love the DX of using webpack here, but I can no longer run my tests with the meteor test command. I'd been using the meteortesting:mocha driver for 6 months without issue until I changed to using webpack. Now I get the error:

Error: Cannot find module '/private/var/folders/3h/cm6yv0bs7xb_7h0_47p_w36h0000gn/T/meteor-test-run1qy5334.dlt1k/node_modules/webpack'

Any ideas how to get this up and running again? I'm happy to contribute if you point me in the right direction!

ardatan commented 6 years ago

Never tested with any testing package like meteortesting:mocha. It's supposed to handle the compiled code. So, you're welcome to contribute this project :) Thank you!

powderham commented 5 years ago

@alexpriceonline did you ever find a solution for this?

I cloned the repo, installed the package locally, passed a flag in my settings testEnv and then prevented webpack-dev-middleware from running. So whilst I didn't get an error, now I have no tests to run, I suspect that webpack is tree shaking them, or something similar so they're not checked