mirror of
https://github.com/markmanx/isoflow.git
synced 2025-02-08 12:27:53 +00:00
53 lines
1.1 KiB
JavaScript
53 lines
1.1 KiB
JavaScript
const path = require('path');
|
|
const HtmlWebPackPlugin = require('html-webpack-plugin');
|
|
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
|
|
|
|
module.exports = {
|
|
mode: 'development',
|
|
entry: './src/index.tsx',
|
|
devtool: 'eval-cheap-source-map',
|
|
output: {
|
|
filename: 'main.js',
|
|
path: path.resolve(__dirname, 'build')
|
|
},
|
|
devServer: {
|
|
static: {
|
|
directory: path.join(__dirname, 'build')
|
|
},
|
|
allowedHosts: [
|
|
'.csb.app', // So Codesandbox.io can run the dev server
|
|
'.ngrok-free.app'
|
|
],
|
|
port: 3000
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.(ts|tsx)$/,
|
|
use: 'ts-loader',
|
|
exclude: /node_modules/
|
|
},
|
|
{
|
|
test: /\.css$/i,
|
|
use: ['style-loader', 'css-loader']
|
|
},
|
|
{
|
|
test: /\.svg$/,
|
|
use: [
|
|
{
|
|
loader: 'svg-url-loader'
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
resolve: {
|
|
extensions: ['.tsx', '.ts', '.js'],
|
|
plugins: [new TsconfigPathsPlugin()]
|
|
},
|
|
plugins: [
|
|
new HtmlWebPackPlugin({
|
|
template: path.resolve(__dirname, '../src/index.html')
|
|
})
|
|
]
|
|
};
|