initial upload
almost finished but needs cleaning
This commit is contained in:
parent
28e8ddb752
commit
7eab55a6b6
11 changed files with 8743 additions and 103 deletions
75
webpack.config.js
Normal file
75
webpack.config.js
Normal file
|
@ -0,0 +1,75 @@
|
|||
|
||||
const path = require('path');
|
||||
var HtmlWebpackPlugin = require( 'html-webpack-plugin' );
|
||||
const CopyPlugin = require('copy-webpack-plugin');
|
||||
|
||||
module.exports =
|
||||
[
|
||||
{
|
||||
mode: "development",
|
||||
devtool: "inline-source-map",
|
||||
|
||||
entry: './src/main.tsx',
|
||||
|
||||
output:
|
||||
{
|
||||
filename: '[name].js',
|
||||
path: path.resolve( __dirname, './dist' ),
|
||||
},
|
||||
|
||||
plugins:
|
||||
[
|
||||
new HtmlWebpackPlugin(
|
||||
{
|
||||
hash: true,
|
||||
filename: "./index.html",
|
||||
template: "./src/index.html",
|
||||
now: Date.now()
|
||||
}
|
||||
),
|
||||
new CopyPlugin(
|
||||
[
|
||||
{ from: './src/styles.css', to: 'styles.css' },
|
||||
{ from: './src/manifest.webmanifest', to: 'manifest.webmanifest' },
|
||||
{ from: './src/models/placeholder.glb', to: 'models/placeholder.glb' },
|
||||
]
|
||||
),
|
||||
],
|
||||
|
||||
module:
|
||||
{
|
||||
rules:
|
||||
[
|
||||
{
|
||||
test: /.tsx?$/,
|
||||
use: 'ts-loader',
|
||||
exclude: /node_modules/
|
||||
},
|
||||
{
|
||||
test: /.css$/,
|
||||
use:
|
||||
[
|
||||
'style-loader',
|
||||
'css-loader'
|
||||
]
|
||||
},
|
||||
{
|
||||
test: /.(png|svg|jpg|gif)$/,
|
||||
use:
|
||||
[
|
||||
'file-loader'
|
||||
]
|
||||
}
|
||||
|
||||
]
|
||||
},
|
||||
|
||||
resolve:
|
||||
{
|
||||
modules:[ path.resolve( __dirname, 'node_modules' ) ],
|
||||
extensions: [ '.ts', '.tsx', '.js' ]
|
||||
},
|
||||
|
||||
}
|
||||
];
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue