mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Add webpack-dev-server
This commit is contained in:
parent
e7610b0e4a
commit
716ac36031
4 changed files with 45 additions and 18 deletions
13
package.json
13
package.json
|
@ -10,8 +10,10 @@
|
|||
"eslint": "^5.16.0",
|
||||
"file-loader": "^3.0.1",
|
||||
"style-loader": "^0.23.1",
|
||||
"webpack": "^4.29.5",
|
||||
"webpack-cli": "^3.2.3"
|
||||
"webpack": "^4.41.0",
|
||||
"webpack-cli": "^3.3.9",
|
||||
"webpack-dev-server": "^3.8.1",
|
||||
"webpack-merge": "^4.2.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"jstree": "^3.3.7",
|
||||
|
@ -23,9 +25,8 @@
|
|||
"libjass": "^0.11.0"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "webpack --mode development",
|
||||
"build": "webpack --mode production",
|
||||
"lint": "eslint \"src\"",
|
||||
"prepare": "webpack --mode production"
|
||||
"start": "webpack-dev-server --config webpack.dev.js --open",
|
||||
"build": "webpack --config webpack.prod.js",
|
||||
"lint": "eslint \"src\""
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,14 +1,8 @@
|
|||
const path = require('path');
|
||||
const CopyPlugin = require('copy-webpack-plugin');
|
||||
|
||||
module.exports = {
|
||||
context: path.resolve(__dirname, 'src'),
|
||||
entry: './bundle.js',
|
||||
output: {
|
||||
filename: 'bundle.js',
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
libraryTarget: 'amd-require'
|
||||
},
|
||||
resolve: {
|
||||
modules: [
|
||||
path.resolve(__dirname, 'node_modules')
|
||||
|
@ -26,10 +20,4 @@ module.exports = {
|
|||
}
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
new CopyPlugin([{
|
||||
from: '**/*',
|
||||
to: '.'
|
||||
}])
|
||||
]
|
||||
};
|
19
webpack.dev.js
Normal file
19
webpack.dev.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
const path = require("path");
|
||||
const common = require("./webpack.common");
|
||||
const merge = require("webpack-merge");
|
||||
const CopyPlugin = require('copy-webpack-plugin');
|
||||
|
||||
module.exports = merge(common, {
|
||||
mode: "development",
|
||||
output: {
|
||||
filename: 'bundle.js',
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
libraryTarget: 'amd-require'
|
||||
},
|
||||
plugins: [
|
||||
new CopyPlugin([{
|
||||
from: '**/*',
|
||||
to: '.'
|
||||
}])
|
||||
]
|
||||
});
|
19
webpack.prod.js
Normal file
19
webpack.prod.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
const path = require("path");
|
||||
const common = require("./webpack.common");
|
||||
const merge = require("webpack-merge");
|
||||
const CopyPlugin = require('copy-webpack-plugin');
|
||||
|
||||
module.exports = merge(common, {
|
||||
mode: "production",
|
||||
output: {
|
||||
filename: 'bundle.js',
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
libraryTarget: 'amd-require'
|
||||
},
|
||||
plugins: [
|
||||
new CopyPlugin([{
|
||||
from: '**/*',
|
||||
to: '.'
|
||||
}])
|
||||
]
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue