Closed woss closed 4 years ago
I sovled it by copying the default template from this repo and using the https://neutrinojs.org/packages/web/#preset-options to set the proper path and then changed the template, this will also work with react because react extends the web preset
Look toward the way to include a custom Wepack plugin in your .neutrinorc.js
file. The plugin you should use is https://www.npmjs.com/package/google-fonts-webpack-plugin . I enabled it like this
neutrino.config.plugin('fonts')
.use(GoogleFontsPlugin, [{
fonts: [
{
family: 'Roboto',
variants: ['300', '400', '500'],
subsets: ['latin', 'latin-ext', 'vietnamese', 'greek', 'greek-ext', 'cyrillic', 'cyrillic-ext']
}
],
local: false
}]);
HI, I've been reading the docs and i can't find the way to inject the
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet">
into the template?I use react preset with latest neurtino. Can you help me out with this?