Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
pathToMake: require('elm/platform').executablePaths['elm-make'],
forceWatch: true,
},
},
],
});
} else {
// Production
config.module.rules.push({
test: /\.elm$/,
exclude: [/elm-stuff/, /node_modules/],
use: [
{
loader: require.resolve('elm-webpack-loader'),
options: {
pathToMake: require('elm/platform').executablePaths['elm-make'],
},
},
],
});
}
return config;
};
config.resolve.extensions.push('.elm');
if (dev) {
config.module.rules.push({
test: /\.elm$/,
exclude: [/elm-stuff/, /node_modules/],
use: [
// {
// loader: 'elm-hot-loader',
// },
{
loader: 'elm-webpack-loader',
options: {
verbose: true,
warn: true,
pathToMake: require('elm/platform').executablePaths[
'elm-make'
],
forceWatch: true,
},
},
],
});
} else {
// Production
config.module.rules.push({
test: /\.elm$/,
exclude: [/elm-stuff/, /node_modules/],
use: [
{
loader: 'elm-webpack-loader',
options: {
pathToMake: require('elm/platform').executablePaths['elm-make'],
forceWatch: true,
},
},
],
});
} else {
// Production
appConfig.module.rules.push({
test: /\.elm$/,
exclude: [/elm-stuff/, /node_modules/],
use: [
{
loader: 'elm-webpack-loader',
options: {
pathToMake: require('elm/platform').executablePaths['elm-make'],
},
},
],
});
}
return appConfig;
},
};
const servedUrl =
envPublicUrl || (publicUrl ? url.parse(publicUrl).pathname : '/');
return ensureSlash(servedUrl, true);
}
module.exports = {
appPath: resolveApp('.'),
appPublic: resolveApp('./public'),
appHtml: resolveApp('./public/index.html'),
appIndexJs: resolveApp('./src/index.js'),
appSrc: resolveApp('./src'),
dotenv: resolveApp('./.env'),
entry: resolveApp('./src/index.js'),
appBuild: resolveApp('./build'),
elmPackageJson: resolveApp('./elm-package.json'),
elmMake: require('elm/platform').executablePaths['elm-make'],
publicUrl: getPublicUrl(resolveApp('elm-package.json')),
servedPath: getServedPath(resolveApp('elm-package.json'))
};
return ensureSlash(servedUrl, true);
}
module.exports = {
appPath: resolveApp('.'),
appPublic: resolveApp('./public'),
appHtml: resolveApp('./public/index.html'),
appIndexJs: resolveApp('./src/index.js'),
componentLibJs: resolveApp('./src/libs/componentLib.js'),
coordinatorLibJs: resolveApp('./src/libs/coordinatorLib.js'),
appSrc: resolveApp('./src'),
dotenv: resolveApp('./.env'),
entry: resolveApp('./src/index.js'),
appBuild: resolveApp('./build'),
elmPackageJson: resolveApp('./elm-package.json'),
elmMake: require('elm/platform').executablePaths['elm-make'],
publicUrl: getPublicUrl(resolveApp('elm-package.json')),
servedPath: getServedPath(resolveApp('elm-package.json'))
};