Skip to content
Snippets Groups Projects
Commit f04c1ae1 authored by Andrea Gottsponer's avatar Andrea Gottsponer
Browse files

- some ts changes

parent bf12fe5b
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,7 @@
"target": "es5",
"esModuleInterop": true,
"strictNullChecks": false,
"removeComments": true,
"typeRoots": [
"node_modules/@types",
"src/types"
......
......@@ -2,15 +2,6 @@ const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const distPath = path.resolve(__dirname, 'dist');
/*
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const outputDir = 'dist_example';
const publicPath = '/';
const tsConfig = 'tsconfig_example.json';
*/
module.exports = {
entry: "./src/app/index.ts",
mode: 'development',
......@@ -51,87 +42,4 @@ module.exports = {
compress: true,
port: 9000
}
/*
output: {
path: path.resolve(__dirname, outputDir),
filename: '[name].bundle.js',
publicPath: publicPath,
crossOriginLoading: 'anonymous'
},
devtool: 'source-map',
mode: 'development',
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/,
},
{
test: /\.tsx?$/,
use: [
{
loader: 'ts-loader',
options: {
configFile: tsConfig
}
}
],
exclude: /node_modules/
},
{
test: /\.mjs$/,
include: /node_modules/,
type: 'javascript/auto'
}
]
},
plugins: [
new HtmlWebpackPlugin({
title: 'Medsurf PIXI',
template: 'src/public/index.html',
hash: true,
minify: {
collapseWhitespace: true,
removeComments: true,
removeRedundantAttributes: true,
removeScriptTypeAttributes: true,
removeStyleLinkTypeAttributes: true,
useShortDoctype: true
}
}),
new webpack.ProvidePlugin({
PIXI: 'pixi.js-legacy'
}),
],
node: {
net: 'empty',
tls: 'empty',
dns: 'empty',
fs: 'empty',
},
resolve: {
extensions: ['.js', '.ts', '.tsx', '.css', '.scss', '.json', '.mjs'],
modules: ['node_modules'],
plugins: []
},
stats: 'verbose',
devServer: {
contentBase: path.join(__dirname, outputDir),
compress: false,
host: '0.0.0.0',
port: 9000,
publicPath: publicPath,
https: false,
overlay: {
warnings: true,
errors: true
},
historyApiFallback: true,
headers: {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, PATCH, OPTIONS",
}
}
*/
};
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment