]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/config/webpack.dev.js
Fix error logging
[github/Chocobozzz/PeerTube.git] / client / config / webpack.dev.js
index 03d6d2fba9410d4f29678bcc59755a4142ada27d..c472ac762f6e0f48462431645bba7cb13fa9a328 100644 (file)
@@ -22,7 +22,8 @@ const METADATA = webpackMerge(commonConfig({env: ENV}).metadata, {
   host: HOST,
   port: PORT,
   ENV: ENV,
-  HMR: HMR
+  HMR: HMR,
+  API_URL: 'http://localhost:9000'
 })
 
 const DllBundlesPlugin = require('webpack-dll-bundles-plugin').DllBundlesPlugin
@@ -79,13 +80,7 @@ module.exports = function (env) {
       chunkFilename: '[id].chunk.js',
 
       library: 'ac_[name]',
-      libraryTarget: 'var',
-
-      publicPath: '/client/'
-    },
-
-    externals: {
-      webtorrent: 'WebTorrent'
+      libraryTarget: 'var'
     },
 
     module: {
@@ -125,6 +120,8 @@ module.exports = function (env) {
       new DefinePlugin({
         'ENV': JSON.stringify(METADATA.ENV),
         'HMR': METADATA.HMR,
+        'API_URL': JSON.stringify(METADATA.API_URL),
+        'process.version': JSON.stringify(process.version),
         'process.env': {
           'ENV': JSON.stringify(METADATA.ENV),
           'NODE_ENV': JSON.stringify(METADATA.ENV),
@@ -234,8 +231,7 @@ module.exports = function (env) {
       historyApiFallback: true,
       watchOptions: {
         ignored: /node_modules/
-      },
-      outputPath: helpers.root('dist')
+      }
     },
 
     /*
@@ -247,6 +243,7 @@ module.exports = function (env) {
     node: {
       global: true,
       crypto: 'empty',
+      fs: 'empty',
       process: true,
       module: false,
       clearImmediate: false,