mirror of
https://github.com/Leaflet/Leaflet.git
synced 2025-07-25 01:32:21 +00:00
Always build ESM version in watch mode (#8844)
This commit is contained in:
@ -7,7 +7,6 @@ import {simpleGit} from 'simple-git';
|
||||
// See: https://rollupjs.org/guide/en/#importing-packagejson
|
||||
const pkg = JSON.parse(readFileSync(new URL('../package.json', import.meta.url)));
|
||||
const release = process.env.NODE_ENV === 'release';
|
||||
const watch = process.argv.includes('-w') || process.argv.includes('--watch');
|
||||
const version = await getVersion();
|
||||
const banner = createBanner(version);
|
||||
|
||||
@ -23,15 +22,7 @@ const config = {
|
||||
sourcemap: true,
|
||||
freeze: false,
|
||||
esModule: false
|
||||
}
|
||||
],
|
||||
plugins: [
|
||||
release ? json() : rollupGitVersion()
|
||||
]
|
||||
};
|
||||
|
||||
if (!watch) {
|
||||
config.output.push(
|
||||
},
|
||||
{
|
||||
file: pkg.module,
|
||||
format: 'es',
|
||||
@ -39,8 +30,11 @@ if (!watch) {
|
||||
sourcemap: true,
|
||||
freeze: false
|
||||
}
|
||||
);
|
||||
}
|
||||
],
|
||||
plugins: [
|
||||
release ? json() : rollupGitVersion()
|
||||
]
|
||||
};
|
||||
|
||||
export default config;
|
||||
|
||||
|
Reference in New Issue
Block a user