-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.library.js
More file actions
60 lines (54 loc) · 1.21 KB
/
webpack.config.library.js
File metadata and controls
60 lines (54 loc) · 1.21 KB
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
/* eslint-disable */
'use strict';
var webpack = require('webpack');
var path = require('path');
var CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = {
context: path.join(__dirname),
entry: {
library: [
'./node_modules/normalize.css/normalize.css',
'./node_modules/highlight.js/styles/solarized_light.css',
'./styles/library/library.scss',
],
application: [
'./node_modules/normalize.css/normalize.css',
'./styles/application/application.scss',
],
app: './scripts/render-library.js',
},
output: {
path: path.join(__dirname, 'dist'),
filename: '[name].js',
},
plugins: [
new CopyWebpackPlugin([
{ from: 'library/index.html' }
])
],
module: {
preLoaders: [{
test: /\.js?$/,
exclude: /node_modules/,
loader: 'babel',
query: {
cacheDirectory: true
},
}],
loaders: [{
test: /\.css$/,
loaders: [ 'style', 'css' ]
}, {
test: /\.scss$/,
loaders: [ 'style', 'css', 'sass' ]
}, {
test: /\.(woff2?|svg)$/,
loader: 'url?limit=10000'
}, {
test: /\.(ttf|eot)$/,
loader: 'file'
}]
},
devtool: 'source-map',
externals: { }
};