Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const { resolve } = require('path');
- const { merge } = require('@neutrinojs/compile-loader');
- module.exports = {
- use: [
- [
- '@neutrinojs/airbnb', {
- 'settings': {
- 'import/resolver': 'babel-plugin-root-import',
- },
- }
- ],
- [
- '@neutrinojs/react',
- {
- html: {
- title: 'njs-lint-resolve-02'
- }
- }
- ],
- (neutrino) => {
- neutrino.config.resolve
- .modules
- .add(neutrino.options.source),
- neutrino.config.module
- .rule('compile')
- .use('babel')
- .tap(options => merge({
- plugins: [
- [
- require.resolve('babel-plugin-root-import'),
- {
- "rootPathPrefix": "@",
- "rootPathSuffix": "src"
- }
- ],
- ]
- }, options));
- }
- ],
- };
Add Comment
Please, Sign In to add comment