Skip to content

Instantly share code, notes, and snippets.

@wayanjimmy
Created March 27, 2018 09:06
Show Gist options
  • Save wayanjimmy/0949496c2c3b4e1a398bf52c5e88759d to your computer and use it in GitHub Desktop.
Save wayanjimmy/0949496c2c3b4e1a398bf52c5e88759d to your computer and use it in GitHub Desktop.
Neutrino react 15.3.2
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