Debian Codegraph @

src/config/version.ts

raw
1 /**
2 * Import swup's current version from package.json
3 */
4
5 // This will only work in webpack 4
6 // export { version as default } from '../../package.json';
7
8 // This will work in microbundle + webpack 5, but won't treeshake in webpack 4
9 // @ts-ignore: package.json is outside of rootDir
10 import pckg from '../../package.json';
11
12 export default pckg.version;