-
-
Notifications
You must be signed in to change notification settings - Fork 52
Open
Description
Steps to reproduce:
- Run
npx @rocket/create@latest
, select the documentation theme. - Cd into that folder and run
npm install
. - Install
@rollup/plugin-json
withnpm i -D @rollup/plugin-json
. - Change
config/rocket.config.js
, adding the rollup json plugin as stated in the documentation:
import json from '@rollup/plugin-json';
import { addPlugin } from 'plugins-manager';
/** @type {import('@rocket/cli').RocketCliOptions} */
export default {
setupDevServerAndBuildPlugins: [addPlugin(json, { }, { location: 'top' })],
};
- Run
npm run build
.
This is the error that shows up:
guillem@guillem-thinkpad:~/projects/lab/rocket-commonjs-plugin-repro$ npm run build
> [email protected] build
> rocket build
Engine building...
Generating Open Graph Images...
Optimize Production Build...
TypeError: Cannot read properties of undefined (reading 'startsWith')
at Object.transform (/home/guillem/projects/lab/rocket-commonjs-plugin-repro/node_modules/@web/dev-server-rollup/dist/rollupAdapter.js:228:30)
at file:///home/guillem/projects/lab/rocket-commonjs-plugin-repro/node_modules/rollup/dist/es/shared/rollup.js:22717:40 {
code: 'PLUGIN_ERROR',
plugin: 'json',
hook: 'transform',
id: '/home/guillem/projects/lab/rocket-commonjs-plugin-repro/_site-dev/inline-module-ad21fcfbb3d325880e51446273377108.js',
watchFiles: [
'/home/guillem/projects/lab/rocket-commonjs-plugin-repro/_site-dev/404.html',
Here is a reproduction repository: https://github.com/guillemcordoba/rocket-commonjs-plugin-repro
Metadata
Metadata
Assignees
Labels
No labels