mirror of
https://github.com/SomboChea/ui
synced 2024-11-04 21:54:30 +07:00
1904179af3
* feat: add browser features to browse by version * chore: verify whether version exist * chore: add link on versions * chore: udpate imports * chore: use mui links * test: add unit test * chore: Add todo list * chore: remove imports
46 lines
1.0 KiB
JavaScript
46 lines
1.0 KiB
JavaScript
import webpack from 'webpack';
|
|
import WebpackDevServer from 'webpack-dev-server';
|
|
import config from './webpack.dev.config.babel';
|
|
import ora from 'ora';
|
|
import env from '../config/env';
|
|
|
|
const compiler = webpack(config);
|
|
const spinner = ora('Compiler is running...').start();
|
|
compiler.hooks.done.tap('Verdaccio Dev Server', () => {
|
|
if (!global.rebuild) {
|
|
spinner.stop();
|
|
console.log('Dev Server Listening at http://localhost:4872/');
|
|
global.rebuild = true;
|
|
}
|
|
});
|
|
|
|
new WebpackDevServer(compiler, {
|
|
contentBase: `${env.DIST_PATH}`,
|
|
publicPath: config.output.publicPath,
|
|
hot: true,
|
|
historyApiFallback: {
|
|
disableDotRule: true,
|
|
},
|
|
quiet: true,
|
|
noInfo: false,
|
|
stats: {
|
|
assets: false,
|
|
colors: true,
|
|
version: true,
|
|
hash: true,
|
|
timings: true,
|
|
chunks: true,
|
|
chunkModules: false,
|
|
},
|
|
proxy: [
|
|
{
|
|
context: ['/-/verdaccio/**', '**/*.tgz'],
|
|
target: 'http://localhost:8080',
|
|
},
|
|
],
|
|
}).listen(4872, 'localhost', function(err) {
|
|
if (err) {
|
|
return console.log(err);
|
|
}
|
|
});
|