This repository has been archived by the owner on Sep 7, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
69 lines (68 loc) · 2.64 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
69
var path = require("path");
var webpack = require("webpack");
module.exports = {
entry: {
bibliometrician: './src/main/resources/client/entries/bibliometrician/bibliometrician.js',
inspector: './src/main/resources/client/entries/inspector/inspector.js',
},
output: {
filename: './src/main/resources/public/2.0/[name].bundle.js',
},
resolve: {
root: [path.join(__dirname, "bower_components"), path.join(__dirname, "/src/main/resources/client")],
alias: {
'c3-js': 'c3/c3.min.js',
'c3-css': 'c3/c3.css',
'owl-carousel.js': 'owlcarousel/owl-carousel/owl.carousel.min.js',
'owl-carousel.css': 'owlcarousel/owl-carousel/owl.carousel.css'
}
},
module: {
loaders: [
{ test: /\.html$/, loader: "html" },
{ test: /\.md$/, loader: "html!markdown" },
{ test: /\.(png|jpg|svg)$/, loader: 'url-loader?limit=10000' },
{
test: /\.css$/,
include: [
path.join(__dirname, "/src/main/resources/client/components"),
path.join(__dirname, "/src/main/resources/client/mixins"),
path.join(__dirname, "/src/main/resources/client/css/modules")
],
loader: "style-loader!css-loader?modules"
},
{
test: /\.css$/,
exclude: [
path.join(__dirname, "/src/main/resources/client/components"),
path.join(__dirname, "/src/main/resources/client/mixins"),
path.join(__dirname, "/src/main/resources/client/css/modules")
],
loader: "style-loader!css-loader"
},
{
test: /\.less$/,
include: [
path.join(__dirname, "/src/main/resources/client/components"),
path.join(__dirname, "/src/main/resources/client/mixins"),
path.join(__dirname, "/src/main/resources/client/css/modules")
],
loader: "style-loader!css-loader?modules!less-loader"
},
{
test: /\.less$/,
exclude: [
path.join(__dirname, "/src/main/resources/client/components"),
path.join(__dirname, "/src/main/resources/client/mixins"),
path.join(__dirname, "/src/main/resources/client/css/modules")
],
loader: "style-loader!css-loader!less-loader"
}
],
},
plugins: [
new webpack.ResolverPlugin(
new webpack.ResolverPlugin.DirectoryDescriptionFilePlugin("bower.json", ["main"])
)
]
};