forked from web-izmerenie/avto-lux161
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathwebpack.config.admin.js
44 lines (39 loc) · 1023 Bytes
/
webpack.config.admin.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
'use strict';
/*jshint esversion: 6 */
/*jshint node: true */
const path = require('path');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const baseConfig = require('./webpack.config.base.js');
const BASE_DIR = __dirname;
const extractCss = new ExtractTextPlugin('admin-[name].bundle.css');
module.exports = baseConfig(extractCss)({
entry: {
'app': path.join(
BASE_DIR, 'front-end-sources', 'admin', 'scripts', 'main.ls'
),
'vendor': [
'jquery',
'jquery-ui/sortable',
'backbone',
'backbone.marionette',
'backbone.wreqr',
'ckeditor/adapters/jquery',
'jade/jade'
]
},
resolve: {
alias: {
base: path.resolve(BASE_DIR, 'front-end-sources', 'admin'),
app: path.resolve(BASE_DIR, 'front-end-sources', 'admin', 'scripts'),
tpl: path.resolve(BASE_DIR, 'front-end-sources', 'admin', 'templates')
},
extensions: ['', '.js', '.ls']
},
output: {
path: path.join(BASE_DIR, 'static'),
filename: 'admin-[name].bundle.js'
},
plugins: [
extractCss
]
});