Skip to content
This repository was archived by the owner on Mar 17, 2021. It is now read-only.
This repository was archived by the owner on Mar 17, 2021. It is now read-only.

raw-loader returns export string instead of file content #108

@FelixSab

Description

@FelixSab
  • Operating System: Ubuntu:16.04
  • Node Version: 14.15.5
  • Yarn Version: 1.22.5
  • webpack Version: 5.24.0
  • raw-loader Version: ^4.0.2

Expected Behavior

Content of the file should be imported

Actual Behavior

a string like export default __webpack_public_path__ + "$test.10d9aaad.txt"; is imported

Code

import test from './test.txt';

console.log({ test }); // should return 'hello, world' but returns mentioned above string

How Do We Reproduce?

I will add that later, when I have successfully reproduced the issue on a small repo

edit: https://github.com/FelixSab/raw-loader-issue

install the npm packages and execute yarn start / npm run start. The result is shown in the console

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