git ssb

0+

dangerousbeans / etherstreams



Tree: 5b2e405d30a0a28a8d6b43dd4ec8b16cdba28cf8

Files: 5b2e405d30a0a28a8d6b43dd4ec8b16cdba28cf8 / build / webpack.base.conf.js

1623 bytesRaw
1var path = require('path')
2var utils = require('./utils')
3var config = require('../config')
4var vueLoaderConfig = require('./vue-loader.conf')
5
6function resolve (dir) {
7 return path.join(__dirname, '..', dir)
8}
9
10module.exports = {
11 entry: {
12 app: './src/main.js'
13 },
14 output: {
15 path: config.build.assetsRoot,
16 filename: '[name].js',
17 publicPath: process.env.NODE_ENV === 'production'
18 ? config.build.assetsPublicPath
19 : config.dev.assetsPublicPath
20 },
21 resolve: {
22 extensions: ['.js', '.vue', '.json'],
23 alias: {
24 'vue$': 'vue/dist/vue.esm.js',
25 '@': resolve('src'),
26 }
27 },
28 node: {
29 fs: "empty"
30 },
31 module: {
32 rules: [
33
34 { test: /vue-icons/, loader: "callback-loader"},
35 {
36 test: /\.vue$/,
37 loader: 'vue-loader',
38 options: vueLoaderConfig
39 },
40 {
41 test: /\.js$/,
42 loader: 'babel-loader',
43 include: [resolve('src'), resolve('test')]
44 },
45 {
46 test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
47 loader: 'url-loader',
48 options: {
49 limit: 10000,
50 name: utils.assetsPath('img/[name].[hash:7].[ext]')
51 }
52 },
53 {
54 test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
55 loader: 'url-loader',
56 options: {
57 limit: 10000,
58 name: utils.assetsPath('media/[name].[hash:7].[ext]')
59 }
60 },
61 {
62 test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
63 loader: 'url-loader',
64 options: {
65 limit: 10000,
66 name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
67 }
68 }
69 ]
70 }
71}
72

Built with git-ssb-web