root: helpers.root('src'),
// remove other default values
- modulesDirectories: [ 'node_modules' ]
+ modulesDirectories: [ 'node_modules' ],
+ packageAlias: 'browser'
+
+ },
+
+ output: {
+ publicPath: '/client/'
},
/*
loader: 'json-loader'
},
- /*
- * Raw loader support for *.css files
- * Returns file content as string
- *
- * See: https://github.com/webpack/raw-loader
- */
{
test: /\.scss$/,
exclude: /node_modules/,
},
+ sassLoader: {
+ precision: 10
+ },
+
/*
* Add additional plugins to the compiler.
*
*
* See: https://www.npmjs.com/package/copy-webpack-plugin
*/
- new CopyWebpackPlugin([{
- from: 'src/assets',
- to: 'assets'
- }]),
+ new CopyWebpackPlugin([
+ {
+ from: 'src/assets',
+ to: 'assets'
+ },
+ {
+ from: 'node_modules/webtorrent/webtorrent.min.js',
+ to: 'assets/webtorrent'
+ }
+ ]),
/*
* Plugin: HtmlWebpackPlugin
new HtmlWebpackPlugin({
template: 'src/index.html',
chunksSortMode: 'dependency'
- }),
-
- new webpack.ProvidePlugin({
- jQuery: 'jquery',
- $: 'jquery',
- jquery: 'jquery'
})
],
node: {
global: 'window',
crypto: 'empty',
+ fs: 'empty',
+ events: true,
module: false,
clearImmediate: false,
setImmediate: false