WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
This repository was archived by the owner on Jun 25, 2020. It is now read-only.
This repository was archived by the owner on Jun 25, 2020. It is now read-only.

Loading JSON files with bundle-loader crashes #74

@ephys

Description

@ephys

Hello,

I'm not sure what I'm doing wrong but for some reason, if I try to lazily load JSON files using this loader, webpack interprets the generated loading code as if it were JSON too and tries to parse it.

This happens using Webpack 4.1.1

I assume it's because the name of the resource bundle-loader generates ends with .json too. (eg. ./node_modules/bundle-loader?lazy&name=file-[name]!./json-files/a.json)

I reproduced the issue using only bundle-loader and a couple of JSON files here: http://github.com/Ephys/bundle-loader-bug

Here is the webpack log of the above project: https://github.com/Ephys/bundle-loader-bug/blob/master/stacktrace.log

Thank you in advance for your help! :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions