alliance-calendar
Version:
Calendrier Alliance Digital
34 lines (32 loc) • 982 B
JavaScript
var path = require("path");
const MomentLocalesPlugin = require('moment-locales-webpack-plugin');
module.exports = {
mode: "production",
entry: "./src/index.js",
output: {
path: path.resolve("build"),
filename: "index.js",
libraryTarget: "commonjs2"
},
module: {
rules: [
{ test: /\.js$/, exclude: /node_modules/, loader: "babel-loader" },
{
test: /\.css$/i,
use: ['style-loader', 'css-loader', 'postcss-loader'],
},
]
},
externals: {
react: "react"
},
plugins: [
// To strip all locales except “en”
new MomentLocalesPlugin(),
// Or: To strip all locales except “en”, “es-us” and “ru”
// (“en” is built into Moment and can’t be removed)
new MomentLocalesPlugin({
localesToKeep: ['es-us', 'ru', 'fr'],
}),
]
};