mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 15:47:23 +02:00
12 lines
318 B
JavaScript
12 lines
318 B
JavaScript
import webpack from 'webpack';
|
|
|
|
export default function compile(config) {
|
|
return new Promise((resolve, reject) => {
|
|
webpack(config, (err, stats) => {
|
|
if (err || stats.hasErrors()) {
|
|
reject(new Error(`Failed to compile with errors`));
|
|
}
|
|
resolve('Compiled successfully');
|
|
});
|
|
});
|
|
}
|