Commit cdd5129e authored by nodegin's avatar nodegin Committed by Tim Neutkens

Simplify with-absolute-imports example (#5812)

* Delete .babelrc

* Update package.json

* Create next.config.js

* Update next.config.js
parent dada692b
{
"presets": ["next/babel"],
"plugins": [
[
"module-resolver",
{
"root": ["./"],
"alias": {
"components": "./components"
}
}
]
]
}
const path = require('path')
module.exports = {
webpack (config, options) {
config.resolve.alias['components'] = path.join(__dirname, 'components')
return config
}
}
...@@ -8,8 +8,5 @@ ...@@ -8,8 +8,5 @@
"next": "latest", "next": "latest",
"react": "^16.1.1", "react": "^16.1.1",
"react-dom": "^16.1.1" "react-dom": "^16.1.1"
},
"devDependencies": {
"babel-plugin-module-resolver": "^3.1.1"
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment