7

I want to import a .js file as string with raw-loader, however the .js file is written with ES6 module, I want to compile and bundle the file with babel and webpack before import it by raw-loader.

In my code, I want to use like:

import SomeScriptsString from '!raw-loader!./my-module-file.js'

// use SomeScriptsString as a string

Could any one can help?

frustigor
  • 392
  • 3
  • 8

0 Answers0