Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jun 25, 2020. It is now read-only.

Support json modules#75

Open
rmja wants to merge1 commit intowebpack-contrib:master
base:master
Choose a base branch
Loading
fromrmja:patch-2
Open

Conversation

@rmja
Copy link

@rmjarmja commentedJul 4, 2018

This is a proposal for a fix to#74. It is not elegant but it gets the job done.
The way the NormalModuleFactory is found from the dependencyFactories is probably not the right way to do it, but I don't have a good enough understanding on how to do this stuff, and this is the proposal I was able to come up with:-)

The example environment that this PR is fixing is:
index.js:

require("bundle-loader!./test.json");

test.json:

{ "any": "json file" }

Without this fix, this currently returns the error:

ERROR in ./src/test.json (./node_modules/bundle-loader!./src/test.json)
Module parse failed: Unexpected token v in JSON at position 0 while parsing near 'var cbs = [],
data...'
You may need an appropriate loader to handle this file type.

kevkehoe, KangYoosam, and maksis reacted with thumbs up emoji
This is a proposal for a fix towebpack-contrib#74. It is not elegant but it gets the job done
@jsf-clabot
Copy link

jsf-clabot commentedJul 4, 2018
edited
Loading

CLA assistant check
All committers have signed the CLA.

@rmja
Copy link
Author

ping. The bug this pr fixes is a showstopper when using json files with webpack 4.

@rmja
Copy link
Author

Ping@michael-ciniawsky, sorry for the noise - any news on this?

@billneff79
Copy link

I can verify that this PR also fixes the issue for me with no adverse side effects that I notice. Would be great to get this, or an equivalent, merged@michael-ciniawsky

@maksis
Copy link

This PR also fixed the issue for me. Are there other maintainers than@michael-ciniawsky who could check this pull request?

@rmja
Copy link
Author

@michael-ciniawsky Could you comment on this? Or maybe point us to someone who would be able to review this?

Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@rmja@jsf-clabot@billneff79@maksis

[8]ページ先頭

©2009-2025 Movatter.jp