Wrap additional loaders in require.resolve.

This commit is contained in:
Dillon Kearns 2019-08-20 09:32:44 -07:00
parent beb9268de0
commit 8bfb568507

View File

@ -219,7 +219,7 @@ function webpackOptions(
{ {
test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/, test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/,
exclude: [/elm-stuff/, /node_modules/], exclude: [/elm-stuff/, /node_modules/],
loader: "url-loader", loader: require.resolve("url-loader"),
options: { options: {
limit: 10000, limit: 10000,
mimetype: "application/font-woff" mimetype: "application/font-woff"
@ -267,7 +267,7 @@ function webpackOptions(
test: /\.elm$/, test: /\.elm$/,
exclude: [/elm-stuff/, /node_modules/], exclude: [/elm-stuff/, /node_modules/],
use: { use: {
loader: "elm-webpack-loader", loader: require.resolve("elm-webpack-loader"),
options: { options: {
optimize: true optimize: true
} }
@ -284,9 +284,9 @@ function webpackOptions(
test: /\.elm$/, test: /\.elm$/,
exclude: [/elm-stuff/, /node_modules/], exclude: [/elm-stuff/, /node_modules/],
use: [ use: [
{ loader: "elm-hot-webpack-loader" }, { loader: require.resolve("elm-hot-webpack-loader") },
{ {
loader: "elm-webpack-loader", loader: require.resolve("elm-webpack-loader"),
options: { options: {
// add Elm's debug overlay to output? // add Elm's debug overlay to output?
debug: debug, debug: debug,