forked from OpenConext/Stepup-tiqr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
44 lines (41 loc) · 1.35 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
var Encore = require('@symfony/webpack-encore');
Encore
.setOutputPath('web/build/')
.setPublicPath('/build')
.cleanupOutputBeforeBuild()
// Convert typescript files.
.enableTypeScriptLoader()
.autoProvidejQuery()
.addStyleEntry('global', './app/Resources/scss/application.scss')
.addEntry('authentication', './src/AppBundle/Resources/javascript/authentication.ts')
.addEntry('registration', './src/AppBundle/Resources/javascript/registration.ts')
// Convert sass files.
.enableSassLoader(function (options) {
// https://github.com/sass/node-sass#options.
options.includePaths = [
'node_modules/bootstrap-sass/assets/stylesheets'
];
options.outputStyle = 'expanded';
})
.addLoader({ test: /\.scss$/, loader: 'import-glob-loader' })
.autoProvidejQuery()
.addLoader({
test: /\.tsx?|\.js$/,
exclude: /node_modules|vendor/,
use: [
{
loader: 'tslint-loader',
options: {
configFile: 'tslint.json',
emitErrors: true,
failOnHint: Encore.isProduction(),
typeCheck: true
}
}
]
})
.enableSourceMaps();
module.exports = Encore.getWebpackConfig();
module.exports.externals = {
jquery: 'jQuery'
};