-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
52 lines (51 loc) · 1.67 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
var CopyWebpackPlugin = require('copy-webpack-plugin');
var webpack = require("webpack");
var path = require('path');
module.exports = {
entry: {
global: './src/pages/js/global.js',
popover: './src/pages/js/popover.js'
},
module: {
loaders: [
{
test: /\.js$/,
loader: 'babel',
exclude: /node_modules/
},
{
test: /\.vue$/,
loader: 'vue'
},
{
test: /\.css$/,
loaders: [
'style',
'css'
]
},
{
test: /\.png$/,
loader: 'url'
}
]
},
vue: {
loaders: {
js: 'babel'
}
},
plugins: [
new CopyWebpackPlugin([
{ from: path.join(__dirname, 'src/icons/'), to: path.join(__dirname, 'build/Comments from Reddit.safariextension/') },
{ from: path.join(__dirname, 'src/pages/html'), to: path.join(__dirname, 'build/Comments from Reddit.safariextension/html') },
{ from: path.join(__dirname, 'src/safari/Info.plist'), to: path.join(__dirname, 'build/Comments from Reddit.safariextension/Info.plist') },
{ from: path.join(__dirname, 'src/safari/Settings.plist'), to: path.join(__dirname, 'build/Comments from Reddit.safariextension/Settings.plist') },
])
],
output: {
path: path.join(__dirname, 'build/Comments from Reddit.safariextension/js'),
filename: '[name].js',
sourceMapFilename: '[name].map'
}
};