-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
37 lines (34 loc) · 1.14 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
var webpack = require('webpack');
var path = require('path');
// require('exports?window.Zepto!./zepto.js');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var extractCSS = new ExtractTextPlugin('/public/stylesheets/[name].css',{allChunks: true});
var extractLESS = new ExtractTextPlugin('/public/stylesheets/[name].less',{allChunks: true});
module.exports = {
//context: path,
//插件项
plugins: [extractCSS, extractLESS],
//页面入口文件配置
entry: {
sliderFilter: './public/scripts/sliderFilterTest.js'
// slider: './module/slider/index.js',
// popBox: './module/popBox/index.js'
},
//入口文件输出配置
output: {
path: './dist/scripts/',
filename: '[name].js'
},
module: {
// 加载器配置
loaders: [
{ test: /\.coffee$/, loader: "coffee-loader" },
{ test: /\.(coffee\.md|litcoffee)$/, loader: "coffee-loader?literate" },
{ test: require.resolve('zepto'), loader: 'exports-loader?window.Zepto!script-loader' }
]
},
resolve: {
//root: path.resolve('./node_modules')
},
watch: true
};