Commit 8e7b75d6 authored by Denys Mishunov's avatar Denys Mishunov

Webpack and Babel configuration

parent 2f2456f5
/* eslint-disable import/no-commonjs, filenames/match-regex */
module.exports = {
presets: [["@babel/preset-env"]],
plugins: [
["@babel/plugin-proposal-class-properties"],
["@babel/plugin-transform-runtime"]
],
overrides: [
{
test: "./react",
presets: [["@babel/preset-react"]],
},
{
test: "./js/frankenstein-wrappers",
presets: [["@babel/preset-react"]],
}
]
};
......@@ -3,6 +3,11 @@ const webpack = require("webpack");
module.exports = {
entry: {
app: "./js/app.js",
frankenstein: [
"@babel/runtime/regenerator",
"@babel/register",
"./js/frankenstein-wrappers/index.js"
]
},
mode: "development",
devServer: {
......@@ -20,6 +25,34 @@ module.exports = {
exclude: /node_modules/,
loader: "babel-loader"
},
{
test: /\.css$/,
use: {
loader: 'css-loader',
options: {
modules: true
}
}
},
{
test: /\.(jpg|png|svg|webp)$/,
use: [
{
loader: "file-loader",
options: {
name: "images/[name].[ext]"
}
}
]
},
{
test: /\.html$/,
use: [
{
loader: "html-loader"
}
]
},
]
},
plugins: [
......@@ -29,4 +62,4 @@ module.exports = {
}
}),
]
};
\ No newline at end of file
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment