explicitly resolve packages in config
This commit is contained in:
parent
2de1c47ed6
commit
ecc9e90bec
@ -2,7 +2,10 @@ module.exports = api => {
|
||||
// caching the babel config
|
||||
api.cache.using(() => process.env.NODE_ENV)
|
||||
return {
|
||||
presets: ['@babel/preset-env', '@babel/preset-react']
|
||||
presets: [
|
||||
require.resolve('@babel/preset-env'),
|
||||
require.resolve('@babel/preset-react')
|
||||
]
|
||||
// plugins: [api.env('development') && 'react-refresh/babel'].filter(Boolean)
|
||||
}
|
||||
}
|
||||
|
6
data/jsconfig.json
Normal file
6
data/jsconfig.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": "src"
|
||||
},
|
||||
"include": ["src", "lib"]
|
||||
}
|
@ -25,16 +25,16 @@ module.exports = (env, argv) => {
|
||||
{
|
||||
test: /\.js$/,
|
||||
exclude: /node_modules/,
|
||||
loader: 'babel-loader'
|
||||
loader: require.resolve('babel-loader')
|
||||
},
|
||||
// process css. css modules are enabled.
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: [
|
||||
isEnvDevelopment && 'style-loader',
|
||||
isEnvDevelopment && require.resolve('style-loader'),
|
||||
isEnvProduction && MiniCssExtractPlugin.loader,
|
||||
{
|
||||
loader: 'css-loader',
|
||||
loader: require.resolve('css-loader'),
|
||||
options: {
|
||||
modules: {
|
||||
localIdentName: isEnvProduction
|
||||
@ -43,7 +43,7 @@ module.exports = (env, argv) => {
|
||||
}
|
||||
}
|
||||
},
|
||||
'postcss-loader'
|
||||
require.resolve('postcss-loader')
|
||||
].filter(Boolean)
|
||||
}
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user