-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebdev.config.js
More file actions
39 lines (37 loc) · 1.16 KB
/
webdev.config.js
File metadata and controls
39 lines (37 loc) · 1.16 KB
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
38
39
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const WebpackLiveReload = require('webpack-livereload-plugin');
const config = {
distDir: path.resolve(__dirname, 'dist'),
srcDir: path.resolve(__dirname, 'src'),
dataDir: path.resolve(__dirname, 'src/data'),
entry: path.resolve(__dirname, "src/scripts/index.js"),
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'main.js'
},
envFile: path.resolve(__dirname, 'environments.js'),
plugins: [
new CleanWebpackPlugin(path.resolve(__dirname, 'dist/'), {
root: path.resolve(__dirname),
exclude: [ 'environment.js', 'livereload.js', 'manifest.json', 'icons', 'service-worker.js' ]
}),
new HtmlWebpackPlugin({
filename: 'index.html',
template: 'index.html',
minify: true,
hash: true,
cache: true,
title: 'safaretjos'
}),
new WebpackLiveReload()
],
context: path.resolve(__dirname),
resolve: {
alias: {
'vue$': 'vue/dist/vue.esm.js'
}
}
}
module.exports = config;