I was really hoping I'd be able to use webpack to load a certificate file containing text using the raw-loader
. Unfortunately it fails at the -
's in the first line: -----BEGIN CERTIFICATE-----
.
As a test I removed the first -----
, and then it fails at a " " (space) character.
Seemed like a much simpler solution than using fs
and a callback.
To clarify, i'd like to be able to do this:
import caCert from './cacert';