mirror of
https://gitea.smigz.com/smiggiddy/odin-codeprojects.git
synced 2024-12-26 14:20:43 -05:00
fix: correct prod mode
This commit is contained in:
parent
9f5f75f6a4
commit
b357ad8ecc
6 changed files with 24 additions and 11 deletions
3
todo/dist/bundle.js
vendored
3
todo/dist/bundle.js
vendored
File diff suppressed because one or more lines are too long
3
todo/package-lock.json
generated
3
todo/package-lock.json
generated
|
@ -19,7 +19,8 @@
|
|||
"style-loader": "^3.3.3",
|
||||
"webpack": "^5.89.0",
|
||||
"webpack-cli": "^5.1.4",
|
||||
"webpack-dev-server": "^4.15.1"
|
||||
"webpack-dev-server": "^4.15.1",
|
||||
"webpack-merge": "^5.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@aashutoshrathi/word-wrap": {
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"watch": "webpack --watch",
|
||||
"start": "webpack serve --open",
|
||||
"build": "webpack"
|
||||
"start": "webpack serve --open --config webpack.dev.js",
|
||||
"build": "webpack --config webpack.prod.js"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
|
@ -20,7 +20,8 @@
|
|||
"style-loader": "^3.3.3",
|
||||
"webpack": "^5.89.0",
|
||||
"webpack-cli": "^5.1.4",
|
||||
"webpack-dev-server": "^4.15.1"
|
||||
"webpack-dev-server": "^4.15.1",
|
||||
"webpack-merge": "^5.10.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"date-fns": "^3.0.6"
|
||||
|
|
|
@ -2,7 +2,6 @@ const path = require('path');
|
|||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
|
||||
module.exports = {
|
||||
mode: 'production',
|
||||
entry: {
|
||||
index: './src/index.js',
|
||||
},
|
||||
|
@ -16,10 +15,6 @@ module.exports = {
|
|||
path: path.resolve(__dirname, 'dist'),
|
||||
clean: true,
|
||||
},
|
||||
devtool: 'inline-source-map',
|
||||
devServer: {
|
||||
static: './dist',
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
11
todo/webpack.dev.js
Normal file
11
todo/webpack.dev.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
const { merge } = require('webpack-merge');
|
||||
const common = require('./webpack.common.js');
|
||||
|
||||
module.exports = merge(common, {
|
||||
mode: 'development',
|
||||
devtool: 'inline-source-map',
|
||||
devServer: {
|
||||
static: './dist',
|
||||
},
|
||||
|
||||
})
|
6
todo/webpack.prod.js
Normal file
6
todo/webpack.prod.js
Normal file
|
@ -0,0 +1,6 @@
|
|||
const { merge } = require('webpack-merge');
|
||||
const common = require('./webpack.common.js');
|
||||
|
||||
module.exports = merge(common, {
|
||||
mode: 'production',
|
||||
});
|
Loading…
Reference in a new issue