I'm running a Phoenix server, where the Webpack config file looks like this in parts:
entry: {
'elm-db': './elm-db/src/Main.elm',
'elm-ledger': './elm-ledger/src/Main.elm',
},
output: {
filename: '[name].js',
path: path.resolve(__dirname, '../priv/static/js'),
publicPath: '/js/',
},
module: {
rules: [
{
test: /\.elm$/,
exclude: [/elm-stuff/, /node_modules/],
use: {
loader: 'elm-webpack-loader',
options: {
cwd: path.resolve(__dirname, 'elm-db'),
debug: options.mode === "development",
optimize: options.mode === "production",
},
},
},
]
},
I have two Elm projects, elm-db and elm-ledger. I've managed to add elm-db correctly to the config file, and it compiles the project just fine. However, I keep failing to add "elm-ledger" as well. The code above produces a correct elm-db.js file, but compiling elm-ledger.js returns errors, probably because I can't make a correct cwd field. I can't find any documentation on the configuration of cwd.