HM-30. Добавлен класс Компонент, поправлены api, внедрен тестовый ком… (#5)

This commit is contained in:
Nikolay
2020-07-07 00:35:36 +03:00
committed by GitHub
parent 06d5ed1522
commit 6dabdd42c0
20 changed files with 580 additions and 95 deletions

View File

@ -4,57 +4,60 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const {CleanWebpackPlugin} = require('clean-webpack-plugin');
module.exports = {
entry: './src/app.js',
output: {
filename: 'main.js',
path: path.resolve(__dirname, 'dist'),
},
devServer: {
compress: true,
port: 9000,
open: true
},
plugins: [
new CleanWebpackPlugin(),
new HtmlWebpackPlugin({
filename: 'index.html',
template: './src/app.html'
}),
new MiniCssExtractPlugin({
filename: 'style.css',
}),
],
module: {
rules: [
{
test: /\.css$/i,
use: [MiniCssExtractPlugin.loader, 'css-loader'],
},
{test: /\.js$/, exclude: /node_modules/, loader: "babel-loader"},
{
test: /\.(gif|png|jpe?g|svg)$/i,
use: [
{
loader: 'image-webpack-loader',
options: {
quality: 80
},
},
{
loader: 'url-loader',
options: {
limit: 200000,
},
},
],
},
{
test: /\.(woff|woff2|eot|ttf|otf)$/,
use: [
'file-loader',
],
},
entry: './src/app.js',
output: {
filename: 'script.js',
path: path.resolve(__dirname, 'dist'),
},
devServer: {
compress: true,
port: 9000,
open: true
},
plugins: [
new CleanWebpackPlugin(),
new HtmlWebpackPlugin({
filename: 'index.html',
template: './src/app.html'
}),
new MiniCssExtractPlugin({
filename: 'style.css',
}),
],
},
};
module: {
rules: [
{
test: /\.css$/i,
use: [MiniCssExtractPlugin.loader, 'css-loader'],
},
{
test: /\.js$/,
exclude: /node_modules/,
loader: "babel-loader"
},
{
test: /\.(gif|png|jpe?g|svg)$/i,
use: [
{
loader: 'image-webpack-loader',
options: {
quality: 80
},
},
{
loader: 'url-loader',
options: {
limit: 200000,
},
},
],
},
{
test: /\.(woff|woff2|eot|ttf|otf)$/,
use: [
'file-loader',
],
},
],
},
};