neutrino-preset-vue
is a Neutrino preset that adds basic support for
Vue components.
Install this preset to your development dependencies, then set it in
.neutrinorc.js
. It should go after neutrino-preset-web
, though it just needs
something to give it an entry point.
module.exports = {
use: [
"neutrino-preset-web",
"neutrino-preset-vue"
],
...
};
If you're using neutrino-preset-lint
or any preset based on it,
this preset will add eslint plugin and rules for Vue components.
If you're using neutrino-preset-stylelint
or any preset based on it,
this preset will add support for <style>
tags in Vue components.
Just ensure the linter presets are loaded before this one.
Vuex makes heavy use of object rest/spread, which is still a stage 3 ECMAScript
proposal. If you want to use it, you have to add the
babel plugin for it. Neutrino Web Preset
users can just add it to that preset through an option in .neutrinorc.js
.
module.exports = {
use: [
["neutrino-preset-web", {
babel: {
plugins: [require.resolve('babel-plugin-transform-object-rest-spread')]
}
}],
"neutrino-preset-vue"
],
...
};