12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- var Path = require('path');
- var LiveReloadPlugin = require('webpack-livereload-plugin')
- module.exports = {
- entry: Path.resolve('src/index.js'),
- output: {
- path: Path.resolve('static/src'),
- filename: 'main.js'
- },
- resolve: {
- extensions: ['.js', '.vue', '.json'],
- alias: {
- 'vue$': 'vue/dist/vue.esm.js',
- '@': Path.resolve('src')
- }
- },
- plugins: [
- new LiveReloadPlugin()
- ],
- module: {
- rules: [
- {
- test: /\.vue$/,
- loader: 'vue-loader'
- },
- {
- test: /\.js$/,
- exclude: /node_modules/,
- loader: 'babel-loader',
- include: Path.resolve('src')
- },
- {
- test: /\.css$/,
- loader: ['style-loader', 'css-loader']
- },
- {
- test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
- loader: 'url-loader',
- options: {
- limit: 10000,
- name: Path.posix.join('static', 'img/[name].[hash:7].[ext]')
- }
- }
- ]
- }
- }
|