Skip to content

Instantly share code, notes, and snippets.

@zwilias
Created February 15, 2019 16:05
Show Gist options
  • Save zwilias/18c2e87777197450146728e9b8626dcd to your computer and use it in GitHub Desktop.
Save zwilias/18c2e87777197450146728e9b8626dcd to your computer and use it in GitHub Desktop.
'use strict';
require('./index.html');
var Elm = require('./Main.elm');
console.log(Elm);
var path = require("path");
module.exports = {
// If your entry-point is at "src/index.js" and
// your output is in "/dist", you can ommit
// these parts of the config
module: {
rules: [
{
test: /\.html$/,
exclude: /node_modules/,
loader: "file-loader?name=[name].[ext]"
},
{
test: /\.elm$/,
exclude: [/elm-stuff/, /node_modules/],
// This is what you need in your own work
// loader: "elm-webpack-loader",
loader: "../index.js",
options: {
debug: true,
files: [
path.resolve(__dirname, "src/Main.elm"),
path.resolve(__dirname, "src/Other.elm")
]
}
}
]
},
devServer: {
inline: true,
stats: "errors-only"
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment