mirror of
https://github.com/strapi/strapi.git
synced 2025-07-18 22:45:47 +00:00
36 lines
750 B
JavaScript
36 lines
750 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,
|
|
useEE: process.env.STRAPI_DISABLE_EE === 'true' ? false : true,
|
|
};
|
|
|
|
return {
|
|
...webpackConfig(args),
|
|
devServer: {
|
|
port: 4000,
|
|
clientLogLevel: 'none',
|
|
quiet: true,
|
|
historyApiFallback: {
|
|
index: '/admin/',
|
|
disableDotRule: true,
|
|
},
|
|
open: false,
|
|
openPage: '/admin',
|
|
},
|
|
};
|
|
};
|