forked from spatie/docs.spatie.be-old
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
64 lines (63 loc) · 2.88 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
const autoprefixer = require('autoprefixer');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const webpack = require('webpack');
module.exports = {
entry: {
'home.style': './resources/assets/sass/home/home.scss',
'home': './resources/assets/js/home.js',
'laravel-backup.style': './resources/assets/sass/laravel-backup/laravel-backup.scss',
'laravel-backup': './resources/assets/js/laravel-backup.js',
'laravel-medialibrary': './resources/assets/js/laravel-medialibrary.js',
'laravel-medialibrary.style': './resources/assets/sass/laravel-medialibrary/laravel-medialibrary.scss',
'laravel-event-projector': './resources/assets/js/laravel-event-projector.js',
'laravel-event-projector.style': './resources/assets/sass/laravel-event-projector/laravel-event-projector.scss',
'menu': './resources/assets/js/menu.js',
'menu.style': './resources/assets/sass/menu/menu.scss',
'laravel-activitylog': './resources/assets/js/laravel-activitylog.js',
'laravel-activitylog.style': './resources/assets/sass/laravel-activitylog/laravel-activitylog.scss',
'laravel-slack-slash-command': './resources/assets/js/laravel-slack-slash-command.js',
'laravel-slack-slash-command.style': './resources/assets/sass/laravel-slack-slash-command/laravel-slack-slash-command.scss',
'laravel-uptime-monitor': './resources/assets/js/laravel-uptime-monitor.js',
'laravel-uptime-monitor.style': './resources/assets/sass/laravel-uptime-monitor/laravel-uptime-monitor.scss',
'image': './resources/assets/js/image.js',
'image.style': './resources/assets/sass/image/image.scss',
'laravel-tags': './resources/assets/js/laravel-tags.js',
'laravel-tags.style': './resources/assets/sass/laravel-tags/laravel-tags.scss',
'laravel-server-monitor': './resources/assets/js/laravel-server-monitor.js',
'laravel-server-monitor.style': './resources/assets/sass/laravel-server-monitor/laravel-server-monitor.scss',
'laravel-html': './resources/assets/js/laravel-html.js',
'laravel-html.style': './resources/assets/sass/laravel-html/laravel-html.scss',
},
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];
},
};