提交 cdd5129e 编写于 作者: N nodegin 提交者: Tim Neutkens

Simplify with-absolute-imports example (#5812)

* Delete .babelrc

* Update package.json

* Create next.config.js

* Update next.config.js
上级 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 @@
"next": "latest",
"react": "^16.1.1",
"react-dom": "^16.1.1"
},
"devDependencies": {
"babel-plugin-module-resolver": "^3.1.1"
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册