mirror of
https://github.com/danbulant/ester_os
synced 2026-05-19 12:18:50 +00:00
63 lines
No EOL
1.5 KiB
JavaScript
63 lines
No EOL
1.5 KiB
JavaScript
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
|
const path = require('path');
|
|
|
|
module.exports = {
|
|
entry: './src/index.ts',
|
|
devtool: 'inline-source-map',
|
|
devServer: {
|
|
compress: true,
|
|
port: 8080
|
|
},
|
|
module: {
|
|
rules: [
|
|
// TYPESCRIPT
|
|
{
|
|
test: /\.tsx?$/,
|
|
use: 'ts-loader',
|
|
exclude: /node_modules/,
|
|
},
|
|
// STYLESHEETS
|
|
{
|
|
test: /\.css$/,
|
|
use: [
|
|
'style-loader',
|
|
'css-loader',
|
|
],
|
|
},
|
|
// IMAGES
|
|
{
|
|
test: /\.(png|svg|jpe?g|gif)$/,
|
|
use: [
|
|
{
|
|
loader: 'file-loader'
|
|
},
|
|
'file-loader',
|
|
],
|
|
},
|
|
// FONTS
|
|
{
|
|
test: /\.(woff|woff2|eot|ttf|otf)$/,
|
|
use: [
|
|
'file-loader',
|
|
],
|
|
},
|
|
],
|
|
},
|
|
resolve: {
|
|
extensions: ['.tsx', '.ts', '.js'],
|
|
},
|
|
output: {
|
|
filename: 'main.js',
|
|
path: path.resolve(__dirname, 'build'),
|
|
},
|
|
|
|
plugins: [
|
|
new CopyWebpackPlugin([
|
|
{
|
|
//Note:- No wildcard is specified hence will copy all files and folders
|
|
from: 'static', //Will resolve to RepoDir/src/assets
|
|
to: '' //Copies all files from above dest to dist/assets
|
|
}
|
|
])
|
|
]
|
|
}; |