-
Notifications
You must be signed in to change notification settings - Fork 4
/
webpack.config.js
55 lines (47 loc) · 2.02 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
const Encore = require('@symfony/webpack-encore');
const GlobImporter = require('node-sass-glob-importer');
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin');
Encore
.setOutputPath('public/build/')
.setPublicPath('/build')
.addEntry('app', './assets/js/app.js')
.addEntry('collection', './assets/js/collection.js')
.addEntry('editor', './assets/js/editor.js')
.addEntry('timetable', './assets/css/timetable.scss')
.addEntry('picker', './assets/js/picker.js')
.addEntry('modal', './assets/js/modal.js')
.addEntry('appointments', './assets/js/appointments.js')
.addEntry('message-downloads', './assets/js/message-downloads.js')
.addEntry('message-overview', './assets/js/message-overview.js')
.addEntry('zipper', './assets/js/zipper.js')
.addEntry('display', './assets/js/display.js')
.addEntry('book', './assets/js/book.js')
.addEntry('entry', './assets/js/entry.js')
.addEntry('export-book', './assets/js/export-book.js')
.addEntry('close-confirm', './assets/js/close-confirm.js')
.addEntry('gradebook', './assets/js/gradebook.js')
.addEntry('tuition-choice-filter', './assets/js/tuition-choice-filter.js')
.addStyleEntry('email', './assets/css/email.scss')
.addStyleEntry('simple', './assets/css/simple.scss')
.addEntry('export-student-absences', './assets/js/export-student-absences.js')
.addEntry('parents_day', './assets/js/parents_day.js')
.addEntry('chat', './assets/js/chat.js')
.configureBabel(() => {}, {
useBuiltIns: 'usage',
corejs: 3
})
.disableSingleRuntimeChunk()
.cleanupOutputBeforeBuild()
.enableSourceMaps(!Encore.isProduction())
.enableSassLoader(function(options) {
options.sassOptions.importer = GlobImporter();
})
.enablePostCssLoader()
.enableVueLoader()
.enableVersioning(Encore.isProduction())
.addPlugin(new NodePolyfillPlugin())
;
module.exports = Encore.getWebpackConfig();
module.exports.resolve.fallback = {
fs: require.resolve('browserify-fs')
};