mirror of
https://github.com/xodio/xod.git
synced 2026-03-25 10:06:55 +01:00
59 lines
1.2 KiB
JavaScript
59 lines
1.2 KiB
JavaScript
const path = require('path');
|
|
const webpack = require('webpack');
|
|
|
|
module.exports = {
|
|
devtool: 'inline-source-map',
|
|
entry: [
|
|
'webpack-dev-server/client?http://localhost:8080/',
|
|
'webpack/hot/only-dev-server',
|
|
'./app/index.jsx',
|
|
],
|
|
output: {
|
|
path: path.join(__dirname, 'dist'),
|
|
filename: 'bundle.js',
|
|
publicPath: 'http://localhost:8080/',
|
|
},
|
|
resolve: {
|
|
modulesDirectories: ['node_modules', 'app'],
|
|
extensions: ['', '.js', '.jsx', '.scss'],
|
|
},
|
|
module: {
|
|
loaders: [
|
|
{
|
|
test: /\.jsx?$/,
|
|
exclude: /node_modules/,
|
|
loaders: [
|
|
'react-hot',
|
|
'babel?presets[]=react,presets[]=es2015',
|
|
],
|
|
},
|
|
{
|
|
test: /\.scss$/,
|
|
loaders: [
|
|
'style',
|
|
'css',
|
|
'autoprefixer?browsers=last 3 versions',
|
|
'sass?outputStyle=expanded',
|
|
],
|
|
},
|
|
{
|
|
test: /\.(jpe?g|png|gif|svg)$/i,
|
|
loaders: [
|
|
'url?limit=8192',
|
|
'img',
|
|
],
|
|
},
|
|
],
|
|
},
|
|
plugins: [
|
|
new webpack.HotModuleReplacementPlugin(),
|
|
new webpack.NoErrorsPlugin(),
|
|
],
|
|
devServer: {
|
|
hot: true,
|
|
host: 'localhost',
|
|
port: 8080,
|
|
contentBase: './dist/',
|
|
},
|
|
};
|