Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@rollup/plugin-commonjs not resolving commonjs module lilconfig #1673

Closed
socketopp opened this issue Feb 8, 2024 · 0 comments
Closed

@rollup/plugin-commonjs not resolving commonjs module lilconfig #1673

socketopp opened this issue Feb 8, 2024 · 0 comments

Comments

@socketopp
Copy link

socketopp commented Feb 8, 2024

"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-node-resolve": "^15.2.3",
"rollup-plugin-postcss": "^4.0.2",

I am using rollup-plugin-postcss to inject css with js so I don't have to do it manually.
I am using ES and it's complaining about lilconfig\dist\index.js not supporting ES modules. But I think it's fixed in version 10.0.0 of postcss-cli.

Then I found commonjs and I was thinking it could resolve this issue but it persists.

I will create a replication if necessary in this case.

import svelte from 'rollup-plugin-svelte';
import { terser } from 'rollup-plugin-terser';
import sveltePreprocess from 'svelte-preprocess';
import commonjs from '@rollup/plugin-commonjs';
import postcss from 'rollup-plugin-postcss';
import resolve from '@rollup/plugin-node-resolve';

export default {
	input: 'src/main.ts',
	output: {
		sourcemap: true,
		format: 'iife',
		name: 'app',
		file: 'public/build/bundle.min.js',
		plugins: [terser()]
	},
	plugins: [
		commonjs(),
		resolve({
			browser: true,
			dedupe: ['svelte']
		}),
		postcss({
			extensions: ['.css'],
			minimize: true,
			inject: {
				insertAt: 'top'
			}
		}),
		svelte({
			preprocess: sveltePreprocess({
				postcss: true
			}),
		}),
	],
};

@rollup rollup locked and limited conversation to collaborators Feb 8, 2024
@shellscape shellscape converted this issue into discussion #1675 Feb 8, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant