mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
48 lines
876 B
JavaScript
48 lines
876 B
JavaScript
const babelLoader = {
|
|
loader: 'babel-loader',
|
|
options: {
|
|
cacheDirectory: true,
|
|
cacheCompression: false,
|
|
presets: [
|
|
'@babel/preset-env',
|
|
[
|
|
'@babel/preset-typescript',
|
|
{
|
|
allExtensions: true,
|
|
},
|
|
],
|
|
],
|
|
plugins: [
|
|
['@babel/plugin-proposal-class-properties'],
|
|
'./webpack/commit-hash.js',
|
|
],
|
|
},
|
|
}
|
|
// const esBuildLoader = {
|
|
// loader: 'esbuild-loader',
|
|
// options: {
|
|
// target: 'esnext',
|
|
// loader: 'ts',
|
|
// },
|
|
// }
|
|
// const swcLoader = {
|
|
// loader: 'swc-loader',
|
|
// options: {
|
|
// jsc: {
|
|
// parser: {
|
|
// syntax: 'typescript',
|
|
// dynamicImport: true,
|
|
// },
|
|
// },
|
|
// },
|
|
// }
|
|
// let tsLoader
|
|
// try {
|
|
// require('swc-loader')
|
|
// tsLoader = swcLoader
|
|
// } catch (e) {
|
|
// tsLoader = babelLoader
|
|
// }
|
|
|
|
module.exports = [babelLoader]
|