1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Simplify with-absolute-imports example (#5812)

* Delete .babelrc

* Update package.json

* Create next.config.js

* Update next.config.js
This commit is contained in:
nodegin 2018-12-04 23:38:39 +08:00 committed by Tim Neutkens
parent dada692bd6
commit cdd5129ef3
3 changed files with 8 additions and 17 deletions

View file

@ -1,14 +0,0 @@
{
"presets": ["next/babel"],
"plugins": [
[
"module-resolver",
{
"root": ["./"],
"alias": {
"components": "./components"
}
}
]
]
}

View file

@ -0,0 +1,8 @@
const path = require('path')
module.exports = {
webpack (config, options) {
config.resolve.alias['components'] = path.join(__dirname, 'components')
return config
}
}

View file

@ -8,8 +8,5 @@
"next": "latest",
"react": "^16.1.1",
"react-dom": "^16.1.1"
},
"devDependencies": {
"babel-plugin-module-resolver": "^3.1.1"
}
}