AnimationTool/webpack/dev.config.js

38 lines
707 B
JavaScript
Raw Normal View History

2019-10-04 23:38:11 +00:00
const path = require('path');
2019-09-25 00:01:54 +00:00
module.exports = {
2019-10-04 23:38:11 +00:00
mode: 'development',
devtool: 'inline-source-map',
entry: {
main: [ './index.ts' ]
},
output: {
filename: 'bundle.js'
},
resolve: {
// Add `.ts` and `.tsx` as a resolvable extension.
extensions: [ '.ts', '.tsx', '.js' ]
},
module: {
rules: [
// all files with a `.ts` or `.tsx` extension will be handled by `ts-loader`
{
test: /\.tsx?$/,
loader: 'ts-loader',
options: {
allowTsInNodeModules: true
}
},
{
test: /\.scss$/,
use: [ 'style-loader', 'css-loader', 'sass-loader?sourceMap' ]
}
]
},
devServer: {
contentBase: path.join(__dirname, '../dist'),
compress: false,
port: 8080
}
};