Skip to content

Instantly share code, notes, and snippets.

@jonlambert
Last active July 10, 2017 14:06
Show Gist options
  • Save jonlambert/2e38092c7527ec97329911882de29d91 to your computer and use it in GitHub Desktop.
Save jonlambert/2e38092c7527ec97329911882de29d91 to your computer and use it in GitHub Desktop.
const webpack = require('webpack')
const path = require('path')
module.exports = {
resolve: {
extensions: ['.ts', '.tsx', '.js', '.jsx', '.scss', '.css', '.ttf']
},
entry: {
app: [
'webpack-hot-middleware/client?reload=true',
'./src/app.tsx'
]
},
output: {
path: path.resolve(__dirname, './build/public'),
filename: '[name].js',
publicPath: '/'
},
module: {
loaders: [
{ test: /\.tsx?/, loader: 'awesome-typescript-loader' },
{ test: /\.sc?ss/, loaders: ['style-loader', 'css-loader', 'sass-loader'] },
{ test: /.ttf/, loaders: ['url-loader'] }
]
},
devServer: {
hot: true,
contentBase: './build/public',
inline: true,
publicPath: 'http://localhost:8080/',
port: 8080
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment