This repository has been archived by the owner on Jun 17, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 173
/
webpack.config.js
68 lines (67 loc) · 2.97 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
const autoprefixer = require('autoprefixer');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const webpack = require('webpack');
module.exports = {
entry: {
'home.style': './resources/sass/home/home.scss',
'home': './resources/js/home.js',
'laravel-backup.style': './resources/sass/laravel-backup/laravel-backup.scss',
'laravel-backup': './resources/js/laravel-backup.js',
'laravel-medialibrary': './resources/js/laravel-medialibrary.js',
'laravel-medialibrary.style': './resources/sass/laravel-medialibrary/laravel-medialibrary.scss',
'laravel-event-projector': './resources/js/laravel-event-projector.js',
'laravel-event-projector.style': './resources/sass/laravel-event-projector/laravel-event-projector.scss',
'menu': './resources/js/menu.js',
'menu.style': './resources/sass/menu/menu.scss',
'laravel-activitylog': './resources/js/laravel-activitylog.js',
'laravel-activitylog.style': './resources/sass/laravel-activitylog/laravel-activitylog.scss',
'laravel-slack-slash-command': './resources/js/laravel-slack-slash-command.js',
'laravel-slack-slash-command.style': './resources/sass/laravel-slack-slash-command/laravel-slack-slash-command.scss',
'laravel-uptime-monitor': './resources/js/laravel-uptime-monitor.js',
'laravel-uptime-monitor.style': './resources/sass/laravel-uptime-monitor/laravel-uptime-monitor.scss',
'image': './resources/js/image.js',
'image.style': './resources/sass/image/image.scss',
'laravel-tags': './resources/js/laravel-tags.js',
'laravel-tags.style': './resources/sass/laravel-tags/laravel-tags.scss',
'laravel-server-monitor': './resources/js/laravel-server-monitor.js',
'laravel-server-monitor.style': './resources/sass/laravel-server-monitor/laravel-server-monitor.scss',
'laravel-html': './resources/js/laravel-html.js',
'laravel-html.style': './resources/sass/laravel-html/laravel-html.scss',
'laravel-blade-x': './resources/js/laravel-blade-x.js',
'laravel-blade-x.style': './resources/sass/laravel-blade-x/laravel-blade-x.scss',
'enum.style': './resources/sass/enum/enum.scss',
'enum': './resources/js/enum.js',
},
output: {
path: 'public/build',
filename: '[name].js',
},
module: {
loaders: [
{
test: /\.scss$/,
loader: ExtractTextPlugin.extract('style', 'css!sass!postcss'),
},
{
test: /\.svg$/,
loader: 'url',
},
],
},
resolve: {
extensions: ['', '.js', '.css', '.scss'],
},
plugins: [
new ExtractTextPlugin('[name].css'),
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
})
],
sassLoader: {
includePaths: ['node_modules'],
},
postcss() {
return [autoprefixer];
},
};