12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- var webpack = require('webpack');
- var path = require('path');
- module.exports = {
- entry: {
- main : "./main.js",
- vendors: ['jquery', 'rem', 'vue'],
- },
- output: {
- },
- resolve: {
- extensions: ['', '.js', '.vue'],
- alias: {
- "vue": 'vue/dist/vue.js',
- "rem": path.resolve(__dirname, './depend/rem/rem.js'),
- "underscore": path.resolve(__dirname, './depend/underscore/underscore.js'),
- "popup": path.resolve(__dirname, './depend/artDialog/popup.js'),
- "dialog-config": path.resolve(__dirname, './depend/artDialog/dialog-config.js'),
- "form": path.resolve(__dirname, './depend/form/form.js'),
- "md5": path.resolve(__dirname, './depend/md5/md5.js'),
- "template": path.resolve(__dirname, './depend/artTemplate/template.js'),
- "cookie": path.resolve(__dirname, './depend/cookie/cookie.js'),
- "store": path.resolve(__dirname, './depend/store/store.js'),
- "jweixin": path.resolve(__dirname, './depend/jweixin/jweixin-1.0.0.js'),
- "lib": path.resolve(__dirname, './depend/lib/lib.js'),
- "BDY": path.resolve(__dirname, './depend/BDY/BDY.js'),
- "lrz": path.resolve(__dirname, './depend/localResizeIMG/lrz.all.bundle.js'),
- "nprogress": path.resolve(__dirname, './depend/nprogress/nprogress.js'),
- "photoswipe": path.resolve(__dirname, './depend/components/photoswipe.js'),
- "dialog": path.resolve(__dirname, './depend/components/dialog.js'),
- }
- },
- module: {
- loaders: [
- { test: /\.vue$/, loader: 'vue' },
- { test: /\.js$/, loader: 'babel', exclude: /node_modules/ },
- { test: /\.css$/, loader: 'style!css!autoprefixer'},
- { test: /\.scss$/, loader: 'style!css!sass'},
- { test: /\.(gif|jpg|png|woff|svg|eot|ttf)\??.*$/, loader: 'url-loader?limit=8192'},
- { test: /\.(html|tpl)$/, loader: 'html-loader' }
- ]
- },
- babel: {
- presets: ['es2015']
- },
- plugins: [
- // generateHtmlPlugin("index"),
- // new webpack.optimize.CommonsChunkPlugin(/* chunkName= */'vendor', /* filename= */'vendor.js', Infinity),
- // new webpack.ProvidePlugin({
- // $: "jquery",
- // jQuery: "jquery",
- // "window.jQuery": "jquery"
- // }),
- // new webpack.optimize.UglifyJsPlugin({ minimize: true }),
- // new ExtractTextPlugin("global.css"),
- // new webpack.DefinePlugin({
- // 'process.env': {
- // NODE_ENV: JSON.stringify("production")
- // }
- // }),
- ],
- extraPath: "../"
- };
|