-
Notifications
You must be signed in to change notification settings - Fork 4
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
No output #11
Comments
You'll want to use the default import: import analyze from 'rollup-plugin-analyzer'; That was a change in the 3.0.0 release to be more consistent with other Rollup plugins. It can still be required destructured, but not used as a named import. So in a node build script you can still use const { analyze } = require('rollup-plugin-analyzer'); but not import { analyze } from 'rollup-plugin-analyzer'; |
Same issue with |
What Rollup version are you using? |
rollup v1.16.4 |
Odd, I'm running 1.16.6 and tried your identical config (with the default import) and it worked as expected. Also updated Rollup in the project and ran all tests against it and all passed. Are you able to provide a repro gist or repo I could test with? |
https://github.com/cdalexndr/rollup-plugin-analyzer-bug-11
|
So the problem is in my environment.
npm v6.10.0 |
The problem was the old node version v6.5.0, updated to v10.16.0 and now it works. |
Might be good to add this to the readme. |
Added to the engine's list in the package.json and added a badge for it up top. |
No output use I run Full terminal log: ~/Projects/GitHub/taro-ui [ui-next ≡ +1 ~4 -0 !]> yarn rollup --config ./config/rollup.config.js
yarn run v1.22.4
$ /Users/<Name>/Projects/GitHub/taro-ui/node_modules/.bin/rollup --config ./config/rollup.config.js
/Users/<Name>/Projects/GitHub/taro-ui/src/index.ts → dist/index.js, dist/es/index.js, dist/umd/index.js...
created dist/index.js, dist/es/index.js, dist/umd/index.js in 56.9s
✨ Done in 58.91s. My import NodePath from 'path'
import RollupJson from '@rollup/plugin-json'
import RollupNodeResolve from '@rollup/plugin-node-resolve'
import RollupCommonjs from '@rollup/plugin-commonjs'
import RollupTypescript from 'rollup-plugin-typescript2'
import RollupAnalyze from 'rollup-plugin-analyzer'
import Package from '../package.json'
const resolveFile = path => NodePath.resolve(__dirname, '..', path)
const externalPackages = [
'react',
'react-dom',
'@tarojs/components',
'@tarojs/runtime',
'@tarojs/taro',
'@tarojs/react'
]
export default {
input: resolveFile(Package.source),
output: [
{
file: resolveFile(Package.main),
format: 'cjs'
},
{
file: resolveFile(Package.module),
format: 'es'
},
{
file: resolveFile(Package.browser),
format: 'umd',
name: 'taro-ui',
globals: {
react: 'React',
'@tarojs/components': 'components',
'@tarojs/taro': 'Taro'
}
}
],
external: externalPackages,
plugins: [
RollupJson(),
RollupNodeResolve({
customResolveOptions: {
moduleDirectory: 'node_modules'
}
}),
RollupCommonjs(),
RollupTypescript({
tsconfig: resolveFile('tsconfig.build.json')
}),
RollupAnalyze({ skipFormatted: true })
]
} System environments: OS: macOS 10.15.3 (19D76) |
Using the following rollup.config:
Building with the following command doesn't print the analytics information:
Same results without any options passed to plugin.
The text was updated successfully, but these errors were encountered: