2018-07-04 19:45:43 +02:00
/* eslint-env node */
2018-07-05 11:54:41 +02:00
const HTMLPlugin = require ( 'html-webpack-plugin' )
const CopyPlugin = require ( 'copy-webpack-plugin' )
2018-07-04 19:45:43 +02:00
const path = require ( 'path' )
2016-06-29 12:27:04 +02:00
module . exports = {
2017-05-10 16:09:36 +02:00
resolve : {
alias : {
Engine : path . resolve ( 'source/engine/' ) ,
2018-01-19 11:57:45 +01:00
Règles : path . resolve ( 'source/règles/' ) ,
2018-07-12 10:09:41 +02:00
Actions : path . resolve ( 'source/actions/' ) ,
Ui : path . resolve ( 'source/components/ui/' ) ,
2017-12-11 15:42:03 +01:00
Components : path . resolve ( 'source/components/' ) ,
2018-07-04 09:42:41 +00:00
Selectors : path . resolve ( 'source/selectors/' ) ,
2018-07-12 10:09:41 +02:00
Reducers : path . resolve ( 'source/reducers/' ) ,
Types : path . resolve ( 'source/types/' )
2017-05-10 16:09:36 +02:00
}
} ,
2018-07-12 10:09:41 +02:00
entry : {
embauche : [ './source/sites/embauche.gouv.fr/entry.js' ] ,
2018-07-31 16:57:39 +02:00
infrance : [ './source/sites/mycompanyinfrance.fr/entry.js' ] ,
2018-07-12 10:09:41 +02:00
} ,
2018-03-01 19:39:36 +01:00
output : {
path : path . resolve ( './dist/' ) ,
2018-07-05 14:35:55 +02:00
filename : '[name].[hash].js'
2018-03-01 19:39:36 +01:00
} ,
2016-06-29 12:27:04 +02:00
module : {
2018-03-01 20:30:57 +01:00
rules : [
2018-01-03 16:54:19 +01:00
{
test : /\.css$/ ,
use : [
{
loader : 'style-loader'
} ,
{
loader : 'css-loader' ,
options : {
sourceMap : true ,
importLoaders : 1
}
} ,
{
2018-01-19 12:29:43 +01:00
loader : 'postcss-loader'
2017-03-14 15:00:54 +01:00
}
2018-01-03 16:54:19 +01:00
]
} ,
2018-02-05 18:17:56 +01:00
{
test : /\.(jpe?g|png|svg)$/ ,
use : {
loader : 'file-loader' ,
options : {
name : 'images/[name].[ext]'
}
}
} ,
2018-01-03 16:54:19 +01:00
{
test : /\.yaml$/ ,
loader : 'json-loader!yaml-loader'
} ,
{
test : /\.js$/ ,
2018-04-27 15:51:31 +02:00
exclude : /node_modules|dist/ ,
2018-01-03 16:54:19 +01:00
loader : 'babel-loader'
} ,
{
test : /\.csv$/ ,
loader : 'csv-loader' ,
options : {
dynamicTyping : true ,
header : true ,
skipEmptyLines : true
2017-03-14 15:00:54 +01:00
}
2018-01-03 16:54:19 +01:00
} ,
{
test : /\.ne$/ ,
loader : 'babel-loader!nearley-loader'
2017-09-19 16:55:23 +02:00
}
2018-01-03 16:54:19 +01:00
]
2018-07-04 19:45:43 +02:00
} ,
plugins : [
2018-07-05 11:54:41 +02:00
new HTMLPlugin ( {
template : 'index.html' ,
2018-07-17 17:36:27 +02:00
chunks : [ 'infrance' ] ,
2018-07-27 19:35:28 +02:00
title : 'My company in france 🇫🇷' ,
description : "The easy guide to help you start your business in france. From registering your company to hiring your first employee." ,
2018-07-17 17:36:27 +02:00
filename : 'infrance.html'
2018-07-12 10:09:41 +02:00
} ) ,
new HTMLPlugin ( {
template : 'index.html' ,
2018-07-17 17:36:27 +02:00
chunks : [ 'embauche' ] ,
2018-07-27 19:35:28 +02:00
title : 'Simulateur d\'embauche 🤝' ,
description : "Simulation du prix d'une embauche en France et calcul du salaire net à partir du brut : CDD, statut cadre, cotisations sociales, retraite..." ,
2018-07-17 17:36:27 +02:00
filename : 'embauche.html' ,
2018-07-05 11:54:41 +02:00
} ) ,
2018-07-27 19:35:28 +02:00
new CopyPlugin ( [ './manifest.webmanifest' , './source/sites/embauche.gouv.fr/images/logo' , './robots.txt' ] )
2018-07-04 19:45:43 +02:00
]
2016-06-29 12:27:04 +02:00
}