forked from sombochea/verdaccio-ui
chore: sync with verdaccio master
This commit is contained in:
@@ -1,55 +1,55 @@
|
||||
const path = require("path");
|
||||
const webpack = require("webpack");
|
||||
const HTMLWebpackPlugin = require("html-webpack-plugin");
|
||||
const FriendlyErrorsPlugin = require("friendly-errors-webpack-plugin");
|
||||
const baseConfig = require("./webpack.config");
|
||||
const StyleLintPlugin = require("stylelint-webpack-plugin");
|
||||
|
||||
const SRC_ROOT = path.resolve(__dirname, "../src/");
|
||||
import webpack from 'webpack';
|
||||
import HTMLWebpackPlugin from 'html-webpack-plugin';
|
||||
import FriendlyErrorsPlugin from 'friendly-errors-webpack-plugin';
|
||||
import baseConfig from './webpack.config';
|
||||
import env from '../src/config/env';
|
||||
import StyleLintPlugin from 'stylelint-webpack-plugin';
|
||||
import getPackageJson from './getPackageJson';
|
||||
|
||||
export default {
|
||||
...baseConfig,
|
||||
|
||||
mode: "development",
|
||||
mode: 'development',
|
||||
|
||||
entry: {
|
||||
main: [
|
||||
"whatwg-fetch",
|
||||
"react-hot-loader/patch",
|
||||
"webpack-dev-server/client?http://localhost:4872",
|
||||
"webpack/hot/only-dev-server",
|
||||
`${SRC_ROOT}/index.js`
|
||||
]
|
||||
'whatwg-fetch',
|
||||
'react-hot-loader/patch',
|
||||
'webpack-dev-server/client?http://localhost:4872',
|
||||
'webpack/hot/only-dev-server',
|
||||
`${env.SRC_ROOT}/webui/index.js`,
|
||||
],
|
||||
},
|
||||
|
||||
output: {
|
||||
...baseConfig.output,
|
||||
publicPath: "/"
|
||||
publicPath: '/',
|
||||
},
|
||||
|
||||
devtool: "cheap-module-eval-source-map",
|
||||
devtool: 'cheap-module-eval-source-map',
|
||||
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
__DEBUG__: true
|
||||
__DEBUG__: true,
|
||||
__APP_VERSION__: `"${getPackageJson('version')}"`,
|
||||
}),
|
||||
new HTMLWebpackPlugin({
|
||||
title: "Verdaccio Dev UI",
|
||||
scope: "",
|
||||
logo: "https://verdaccio.org/img/logo/symbol/svg/verdaccio-tiny.svg",
|
||||
filename: "index.html",
|
||||
verdaccioURL: "//localhost:4873",
|
||||
template: `${SRC_ROOT}/template/index.html`,
|
||||
title: 'Verdaccio Dev UI',
|
||||
scope: '',
|
||||
logo: 'https://verdaccio.org/img/logo/symbol/svg/verdaccio-tiny.svg',
|
||||
filename: 'index.html',
|
||||
verdaccioURL: '//localhost:4873',
|
||||
template: `${env.SRC_ROOT}/webui/template/index.html`,
|
||||
debug: true,
|
||||
inject: true
|
||||
inject: true,
|
||||
}),
|
||||
new webpack.HotModuleReplacementPlugin(),
|
||||
new webpack.NoEmitOnErrorsPlugin(),
|
||||
new FriendlyErrorsPlugin(),
|
||||
new StyleLintPlugin({
|
||||
files: ["src/**/styles.js"],
|
||||
files: ['src/webui/**/styles.js'],
|
||||
failOnError: false,
|
||||
emitErrors: false
|
||||
})
|
||||
]
|
||||
}),
|
||||
],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user