WikiLerni/front/webpack.config.js

51 lines
1.2 KiB
JavaScript

const path = require('path');
module.exports =
{
mode: "development",
devtool: "inline-source-map",
entry:
{
accountUser: "./src/accountUser.js",
connection: "./src/connection.js",
deconnection: "./src/deconnection.js",
deleteValidation: "./src/deleteValidation.js",
homeManager: "./src/homeManager.js",
homeUser: "./src/homeUser.js",
index: "./src/index.js",
loginLink: "./src/loginLink.js",
manageQuestionnaires: "./src/manageQuestionnaires.js",
manageUsers: "./src/manageUsers.js",
newLoginValidation: "./src/newLoginValidation.js",
polyfill: "babel-polyfill",
questionnaire: "./src/questionnaire.js",
subscribe: "./src/subscribe.js",
subscribeValidation: "./src/subscribeValidation.js",
unsubscribe: "./src/unsubscribe.js"
},
output:
{
filename: "./JS/[name].app.js",
path: path.resolve(__dirname, "public")
},
module:
{
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: "babel-loader",
options: {
presets: ["@babel/preset-env"]
}
}
}
]
},
devServer:
{
contentBase: path.resolve(__dirname, "./public")
}
};