forked from Elyx0/rosenblattperceptronjs
-
Notifications
You must be signed in to change notification settings - Fork 3
/
webpack.config.js
45 lines (43 loc) · 1.08 KB
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import path from 'path';
import webpack from 'webpack';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import ExtractTextPlugin from 'extract-text-webpack-plugin';
export default {
devtool: '#source-map',
entry: [
path.join(__dirname,'src/index.js')
],
module: {
rules: [
{
test: /\.js$/,
use: 'babel-loader',
exclude: /node_modules/
},
{
test: /\.json$/,
use: 'json-loader'
},
{
test: /\.scss$/,
use: ExtractTextPlugin.extract({
use: [{loader: 'css-loader'},{loader: 'sass-loader'}],
fallback: 'style-loader'
})
}
]
},
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle.js',
},
resolve: {
extensions: ['.js','.json'],
modules: [path.join(__dirname,'src'),'node_modules']
},
plugins: [
new ExtractTextPlugin({filename:"[name].[contenthash].css"}),
new webpack.NamedModulesPlugin(),
new HtmlWebpackPlugin({title: 'Визуализация перцептрона',template: 'src/index.html.ejs'})
]
}