Created
March 27, 2018 09:06
-
-
Save wayanjimmy/0949496c2c3b4e1a398bf52c5e88759d to your computer and use it in GitHub Desktop.
Neutrino react 15.3.2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { merge } = require('@neutrinojs/compile-loader'); | |
const { ProvidePlugin } = require('webpack'); | |
const env = require('@neutrinojs/env'); | |
module.exports = { | |
use: [ | |
[ | |
'@neutrinojs/react', | |
{ | |
html: { | |
title: 'gadogadolontong' | |
} | |
} | |
], | |
neutrino => { | |
// neutrino.use(env, ['PZ_API_HOST']); | |
neutrino.config | |
.entry('vendor') | |
.add('react') | |
.add('react-dom') | |
.add('jquery') | |
.add('axios'); | |
neutrino.config.plugin('provide').use(ProvidePlugin, [ | |
{ | |
$: 'jquery', | |
jQuery: 'jquery' | |
} | |
]); | |
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 | |
) | |
); | |
} | |
] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment