question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Towards webpack support

See original GitHub issue

I’d like to offer an approach to make webpack-built projects easily testable. Right now I’m using the webpack alias babel plugin, but any special loaders are ignored, and that code cannot be tested without extracting it elsewhere.

Ava can watch globs, transpile, augment and run tests. Webpack can watch entries, use loaders, and run plugins.

To map one to the other, this would work I think:

  • Generate entries from globs
  • Make ava-loader to do the power-assert stuff and anything else necessary, perhaps after the regular babel-loader ran.
  • Make ava-plugin (much like start-server-webpack-plugin) to run Ava on all the entries
    • preferably from the memory fs that webpack maintains

So, the transpile/augment code would need to run in ava-loader and the run code would need to run in ava-plugin.

Does this seem like a correct approach? Is the code in such a state that ava-loader and ava-plugin would just run internal Ava API calls?

I don’t know of a project that allows you to run a script in a child from a webpack in-memory fs, but transpiling to a temp dir is certainly acceptable for me.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:13 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
novemberborncommented, Apr 14, 2019

@glenndevenish yea it’s been removed. IIRC because it had gotten too outdated.

1reaction
novemberborncommented, Jul 2, 2017
Read more comments on GitHub >

github_iconTop Results From Across the Web

webpack
Support the Team. Through contributions, donations, and sponsorship, you allow webpack to thrive. Your donations directly support office hours, continued ...
Read more >
Adds webpack support to lektor. - GitHub
This is a plugin for Lektor that adds support for webpack to projects. When enabled it can build a webpack project from the...
Read more >
6 ways to configure Webpack - DEV Community ‍ ‍
Webpack is a build tool to make code, which was not primarily written for ... from the command line interface, you can run...
Read more >
A Guide to Managing Webpack Dependencies - Toptal
With a Master's degree in Service Science, Management, and Engineering, Andrej works ... Finally, we discuss how to configure Webpack, if we want...
Read more >
Webpack | WebStorm Documentation - JetBrains
This support improves coding assistance in JavaScript files by taking into account ... Specify the webpack configuration files to use.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found