-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
29 lines (28 loc) · 986 Bytes
/
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
var webpack = require('webpack');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
entry: './app.js',
output: {
path: './src/content',
filename: 'bundle.js',
publicPath: '/content/',
libraryTarget: 'var',
library: 'global'
},
resolve: {
modulesDirectories: ['node_modules', './src/js', './src/less' ],
extensions: ['', '.js', '.less']
},
module: {
loaders: [
{ test: /\.css$/, loader: ExtractTextPlugin.extract('style-loader', 'css-loader') },
{ test: /\.less$/, loader: ExtractTextPlugin.extract('style-loader', 'css-loader!less-loader') },
{ test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: 'url-loader?limit=10000&minetype=application/font-woff' },
{ test: /\.(ttf|eot|svg|png|jpg|gif)(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: 'file-loader' }
]
},
plugins: [
new webpack.ProvidePlugin({ $: 'jquery', jQuery: 'jquery' }),
new ExtractTextPlugin('[name].css')
]
}