mirror of
https://github.com/Aviortheking/MasterMind.git
synced 2025-04-23 03:12:13 +00:00
Base du jeux
Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
This commit is contained in:
parent
03e521ae0f
commit
f7a3ae6815
15
README.md
Normal file
15
README.md
Normal file
@ -0,0 +1,15 @@
|
||||
# 🚀 Welcome to your new awesome project!
|
||||
|
||||
This project has been created using **webpack scaffold**, you can now run
|
||||
|
||||
```
|
||||
npm run build
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```
|
||||
yarn build
|
||||
```
|
||||
|
||||
to bundle your application
|
12
index.html
Normal file
12
index.html
Normal file
@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
</body>
|
||||
<script src="/dist/main.js"></script>
|
||||
</html>
|
26
package.json
Normal file
26
package.json
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
"name": "my-webpack-project",
|
||||
"version": "1.0.0",
|
||||
"main": "index.js",
|
||||
"repository": "git@github.com:Nicolas-Brossard/MasterMind.git",
|
||||
"author": "Florian BOUILLON <florian.bouillon@delta-wings.net>",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"serve": "^11.3.2",
|
||||
"typescript": "^4.1.2",
|
||||
"webpack": "^5.6.0",
|
||||
"webpack-cli": "^4.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@webpack-cli/init": "^1.0.3",
|
||||
"babel-plugin-syntax-dynamic-import": "^6.18.0",
|
||||
"terser-webpack-plugin": "^5.0.3",
|
||||
"ts-loader": "^8.0.11"
|
||||
},
|
||||
"description": "My webpack project",
|
||||
"scripts": {
|
||||
"dev": "webpack --watch",
|
||||
"build": "webpack",
|
||||
"serve": "serve ."
|
||||
}
|
||||
}
|
1
src/index.ts
Normal file
1
src/index.ts
Normal file
@ -0,0 +1 @@
|
||||
console.log('Hello World from your main file!');
|
9
tsconfig.json
Normal file
9
tsconfig.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"noImplicitAny": true,
|
||||
"module": "es6",
|
||||
"target": "es5",
|
||||
"allowJs": true
|
||||
}
|
||||
}
|
68
webpack.config.js
Normal file
68
webpack.config.js
Normal file
@ -0,0 +1,68 @@
|
||||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* SplitChunksPlugin is enabled by default and replaced
|
||||
* deprecated CommonsChunkPlugin. It automatically identifies modules which
|
||||
* should be splitted of chunk by heuristics using module duplication count and
|
||||
* module category (i. e. node_modules). And splits the chunks…
|
||||
*
|
||||
* It is safe to remove "splitChunks" from the generated configuration
|
||||
* and was added as an educational example.
|
||||
*
|
||||
* https://webpack.js.org/plugins/split-chunks-plugin/
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* We've enabled TerserPlugin for you! This minifies your app
|
||||
* in order to load faster and run less javascript.
|
||||
*
|
||||
* https://github.com/webpack-contrib/terser-webpack-plugin
|
||||
*
|
||||
*/
|
||||
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
|
||||
|
||||
|
||||
|
||||
module.exports = {
|
||||
mode: 'development',
|
||||
entry: './src/index.ts',
|
||||
plugins: [new webpack.ProgressPlugin()],
|
||||
|
||||
module: {
|
||||
rules: [{
|
||||
test: /\.(ts|tsx)$/,
|
||||
loader: 'ts-loader',
|
||||
include: [path.resolve(__dirname, 'src')],
|
||||
exclude: [/node_modules/]
|
||||
}]
|
||||
},
|
||||
|
||||
resolve: {
|
||||
extensions: ['.tsx', '.ts', '.js']
|
||||
},
|
||||
|
||||
optimization: {
|
||||
minimizer: [new TerserPlugin()],
|
||||
|
||||
splitChunks: {
|
||||
cacheGroups: {
|
||||
vendors: {
|
||||
priority: -10,
|
||||
test: /[\\/]node_modules[\\/]/
|
||||
}
|
||||
},
|
||||
|
||||
chunks: 'async',
|
||||
minChunks: 1,
|
||||
minSize: 30000,
|
||||
name: false
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user