AnimationTool/webpack/prod.config.js

30 lines
553 B
JavaScript

const path = require('path');
module.exports = {
mode: 'production',
entry: './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: /\.(s*)css$/,
use: [ 'style-loader', 'css-loader', 'sass-loader' ]
}
]
}
};