forked from hwdtech/smartforms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.common.config.js
More file actions
44 lines (39 loc) · 825 Bytes
/
webpack.common.config.js
File metadata and controls
44 lines (39 loc) · 825 Bytes
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
/* eslint-env node */
const path = require('path');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
output: {
path: path.join(__dirname, 'dist'),
filename: 'smartforms.js',
libraryTarget: 'var',
library: 'smartforms'
},
externals: {
jquery: 'jQuery'
},
module: {
rules: [{
test: /\.js$/,
exclude: /(node_modules)/,
loader: 'babel-loader'
}, {
test: /\.jade/,
loader: 'jade-loader'
}, {
test: /\.css$/,
loader: ExtractTextPlugin.extract({
fallbackLoader: 'style-loader',
loader: [
'css-loader',
'postcss-loader'
]
})
}, {
test: /\.png/,
loader: 'url-loader'
}]
},
plugins: [
new ExtractTextPlugin('smartforms.css')
]
};