mirror of
https://github.com/strapi/strapi.git
synced 2025-07-21 16:10:18 +00:00
33 lines
624 B
JavaScript
33 lines
624 B
JavaScript
![]() |
const path = require('path');
|
||
|
const webpackConfig = require('./webpack.config.js');
|
||
|
|
||
|
module.exports = () => {
|
||
|
const entry = path.join(__dirname, 'admin', 'src', 'app.js');
|
||
|
const dest = path.join(__dirname, 'build');
|
||
|
const env = 'development';
|
||
|
const options = {
|
||
|
backend: 'http://localhost:1337',
|
||
|
publicPath: '/admin/',
|
||
|
};
|
||
|
|
||
|
const args = {
|
||
|
entry,
|
||
|
dest,
|
||
|
env,
|
||
|
options,
|
||
|
};
|
||
|
|
||
|
return {
|
||
|
...webpackConfig(args),
|
||
|
devServer: {
|
||
|
port: 4000,
|
||
|
clientLogLevel: 'none',
|
||
|
hot: true,
|
||
|
quiet: true,
|
||
|
historyApiFallback: {
|
||
|
index: '/admin/',
|
||
|
},
|
||
|
},
|
||
|
};
|
||
|
};
|