rollup throws missing warning on existing plugin-node-resolve option

129 views Asked by At

I'm launching svelte with npm run dev after updating some packages and now I'm getting this warning:

WARNING: Your @rollup/plugin-node-resolve configuration's 'exportConditions' array should include 'svelte'. See https://github.com/sveltejs/rollup-plugin-svelte#svelte-exports-condition for more information

In my rollup.config.js I'm importing the relevant librariess:

import svelte from 'rollup-plugin-svelte';
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';

I'm explicitly listing 'svelte' in exportConditions:

export default {
    input: 'src/main.js',
    output: {
        sourcemap: true,
        format: 'iife',
        name: 'app',
        file: 'public/build/bundle.js'
    },
    plugins: [
        ...,
        resolve({
            browser: true,
            exportConditions: ['svelte'],
            extensions: ['.svelte'],
        }),
        commonjs(),
        ...,
    ]
}

I'm currently working with svelte 4.2.7, rollup 4.5.2, @rollup/plugin-node-resolve 15.2.3 and @rollup/plugin-commonjs 25.0.7.

0

There are 0 answers