v0.0.1
This commit is contained in:
61
.babelrc.js
Normal file
61
.babelrc.js
Normal file
@@ -0,0 +1,61 @@
|
||||
module.exports = (api) => {
|
||||
api.cache(true);
|
||||
return {
|
||||
sourceType: 'module',
|
||||
presets: [
|
||||
[
|
||||
'@babel/preset-env',
|
||||
{
|
||||
useBuiltIns: 'usage',
|
||||
corejs: 3,
|
||||
}
|
||||
],
|
||||
[
|
||||
'@babel/preset-react',
|
||||
{
|
||||
development: process.env.NODE_ENV === 'development',
|
||||
}
|
||||
]
|
||||
],
|
||||
plugins: [
|
||||
'@babel/plugin-proposal-optional-chaining',
|
||||
[
|
||||
'@babel/plugin-proposal-decorators',
|
||||
{
|
||||
legacy: true
|
||||
}
|
||||
],
|
||||
'@babel/plugin-proposal-function-sent',
|
||||
'@babel/plugin-proposal-export-namespace-from',
|
||||
'@babel/plugin-proposal-numeric-separator',
|
||||
'@babel/plugin-proposal-throw-expressions',
|
||||
// Stage 3
|
||||
'@babel/plugin-syntax-dynamic-import',
|
||||
'@babel/plugin-syntax-import-meta',
|
||||
[
|
||||
'@babel/plugin-proposal-class-properties',
|
||||
{
|
||||
loose: true
|
||||
}
|
||||
],
|
||||
'@babel/plugin-proposal-json-strings',
|
||||
[
|
||||
'module-resolver', {
|
||||
root: [
|
||||
'./src'
|
||||
],
|
||||
alias: {
|
||||
'@slice': './src/slice',
|
||||
'@util': './src/util',
|
||||
'@container': './src/container',
|
||||
'@style': './src/style',
|
||||
'@constant': './src/constant',
|
||||
'@context': './src/context',
|
||||
'@components': './src/components',
|
||||
'@hook': './src/hook',
|
||||
'@assets': './assets',
|
||||
}
|
||||
}]
|
||||
],
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user