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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic import does not work on windows after 2.0.7 (re-open part deux) #362

Closed
johnnyreilly opened this issue Sep 24, 2018 · 3 comments · Fixed by #373
Closed

Dynamic import does not work on windows after 2.0.7 (re-open part deux) #362

johnnyreilly opened this issue Sep 24, 2018 · 3 comments · Fixed by #373

Comments

@johnnyreilly
Copy link

johnnyreilly commented Sep 24, 2018

  • Operating System: Windows 10

  • Node Version: v10.5.0

  • NPM Version: v6.1.0

  • webpack Version: v4.10.2

  • karma-webpack Version: 4.0.0-rc.2

  • yarn Version: 1.9.2

First of all, thanks for all the work you do on karma-webpack. It's tremendous; I really appreciate it.

Expected Behavior

This is a reopen of issue #317 which was itself a reopen of #291

The PR #338 has not resolved the issue it seems.

Essentially, dynamic imports failing on Windows post v2.0.6.

Actual Behavior

I'm opening this issue as I've tested 4.0.0-rc.2 on Windows; and alas the problem with dynamic imports is still present. It's what we use in ts-loader for our execution test pack.

It's nicely illustrated in this PR which upgrades karma from 2-3 (which caused no issues) and then karma-webpack from 2.0.6 to 4.0.0-rc2:

TypeStrong/ts-loader#840

As you can see, Linux is fine; Windows is not. The failing tests all relate to code splitting / dynamic imports.

How Do We Reproduce?

The simplest way to reproduce this locally is to:

git clone https://github.com/johnnyreilly/ts-loader.git
cd ts-loader
yarn
yarn build
yarn execution-tests --single-test 2.4.1_importCodeSplitting

If you'd like to debug this then do this:

yarn execution-tests --single-test 2.4.1_importCodeSplitting --watch

And go to http://localhost:9876/

This should run a single test which reliably fails on Windows and passes on Mac / Linux.

To understand the context take a look at the test code here: https://github.com/johnnyreilly/ts-loader/tree/master/test/execution-tests/2.4.1_importCodeSplitting

It should (I hope!) be fairly self-explanatory.

@gfdickinson
Copy link

Curious, if anyone has taken a look at this?

@gfdickinson
Copy link

#366 Is this PR relevant to this issue?

@johnnyreilly
Copy link
Author

Seems like it could be!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants