Guest User

Untitled

a guest
Mar 25th, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. const { resolve } = require('path');
  2. const { merge } = require('@neutrinojs/compile-loader');
  3.  
  4. module.exports = {
  5. use: [
  6. [
  7. '@neutrinojs/airbnb', {
  8. 'settings': {
  9. 'import/resolver': 'babel-plugin-root-import',
  10. },
  11. }
  12. ],
  13. [
  14. '@neutrinojs/react',
  15. {
  16. html: {
  17. title: 'njs-lint-resolve-02'
  18. }
  19. }
  20. ],
  21. (neutrino) => {
  22.  
  23. neutrino.config.resolve
  24. .modules
  25. .add(neutrino.options.source),
  26.  
  27. neutrino.config.module
  28. .rule('compile')
  29. .use('babel')
  30. .tap(options => merge({
  31. plugins: [
  32. [
  33. require.resolve('babel-plugin-root-import'),
  34. {
  35. "rootPathPrefix": "@",
  36. "rootPathSuffix": "src"
  37. }
  38. ],
  39. ]
  40. }, options));
  41.  
  42. }
  43. ],
  44. };
Add Comment
Please, Sign In to add comment