2022-12-15 14:35:07 +08:00
|
|
|
import { defineConfig } from '@ice/app';
|
|
|
|
import icestark from '@ice/plugin-icestark';
|
|
|
|
|
|
|
|
export default defineConfig(() => ({
|
|
|
|
ssr: false,
|
|
|
|
ssg: false,
|
|
|
|
plugins: [
|
|
|
|
icestark({
|
|
|
|
type: 'framework',
|
|
|
|
}),
|
2023-10-11 13:36:11 +08:00
|
|
|
{
|
|
|
|
setup({ onGetConfig }) {
|
|
|
|
// Enable option `enableCopyPlugin`, so devserver can access public folder when run test.
|
|
|
|
if (process.env.NODE_ENV === 'test') {
|
|
|
|
onGetConfig((config) => {
|
|
|
|
return {
|
|
|
|
...config,
|
|
|
|
enableCopyPlugin: true,
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-12-15 14:35:07 +08:00
|
|
|
]
|
|
|
|
}));
|