deprecated_overflow_webapp/config/webpack/webpack.config.base.js
crusader 88a2218e17 ing
2017-12-21 15:58:35 +09:00

55 lines
1.1 KiB
JavaScript

const Path = require('path');
const TsConfigPathsPlugin = require('awesome-typescript-loader').TsConfigPathsPlugin;
module.exports = {
target: 'web',
output: {
path: Path.resolve(__dirname, '../../dist'),
filename: '[name].js',
publicPath: '/'
},
devtool: '',
resolve: {
extensions: ['.ts', '.tsx', '.js', '.json'],
// Fix webpack's default behavior to not load packages with jsnext:main module
// https://github.com/Microsoft/TypeScript/issues/11677
mainFields: ['browser', 'main'],
plugins: [
new TsConfigPathsPlugin({
tsconfig: "tsconfig.json",
compiler: "typescript"
})
]
},
module: {
loaders: [
{
enforce: 'pre',
test: /\.tsx?$/,
exclude: [
Path.resolve(__dirname, '../../node_modules/')
],
use: [
{
loader: 'tslint-loader'
}
],
}
]
},
plugins: [
],
node: {
// workaround for webpack-dev-server issue
// https://github.com/webpack/webpack-dev-server/issues/60#issuecomment-103411179
fs: 'empty',
net: 'empty'
}
};