12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- var webpack = require('webpack');
- var config = require('./webpack.base.config');
- var HtmlWebpackPlugin = require('html-webpack-plugin');
- var ExtractTextPlugin = require("extract-text-webpack-plugin");
- config.devtool = '#source-map';
- config.output.publicPath = '/';
- config.output.filename = '[name].js';
- config.output.chunkFilename = '[name].chunk.js';
- config.vue = {
- loaders : {
- css: ExtractTextPlugin.extract(
- "style-loader",
- "css-loader?sourceMap",
- {
- publicPath: '/',
- }
- ),
- less: ExtractTextPlugin.extract(
- 'vue-style-loader',
- 'css-loader!less-loader'
- ),
- sass: ExtractTextPlugin.extract(
- 'vue-style-loader',
- 'css-loader!sass-loader'
- )
- }
- }
- config.plugins = (config.plugins || []).concat([
- new ExtractTextPlugin("[name].css",{ allChunks : true, resolve : ['modules'] }),
- new webpack.optimize.CommonsChunkPlugin('vendors', 'vendors.js'),
- new HtmlWebpackPlugin({
- filename: '../index.html',
- template: './index.ejs',
- inject: false
- }),
- new webpack.ProvidePlugin({
- $: "jquery",
- jQuery: "jquery",
- "window.jQuery": "jquery"
- })
- ]);
- module.exports = config;
|