TrySound / rollup-plugin-string

Converts text files to modules
MIT License
85 stars 13 forks source link

Probably bad "main" field #16

Closed guimard closed 5 years ago

guimard commented 5 years ago

Hi,

package.json "main" field points to index.js. This fails with node 10.15.2. I replaced this value by dist/rollup-plugin-string.js then it succeed. Am I wrong ?

guimard commented 5 years ago

Then of course "files" field must be adjusted

TrySound commented 5 years ago

Which version of this plugin do you use?

guimard commented 5 years ago

3.0.0

TrySound commented 5 years ago

Show me your rollup config

guimard commented 5 years ago
import buble from 'rollup-plugin-buble';

var pkg = require('./package.json');

export default {
        entry: 'index.js',
        plugins: [buble()],
        targets: [
                {
                        format: 'cjs',
                        dest: pkg['main']
                },
                {
                        format: 'es6',
                        dest: pkg['jsnext:main']
                }
        ]
};

I packaged it for Debian

TrySound commented 5 years ago

Are you sure you wanted to post this issue in rollup-plugin-string repo?

guimard commented 5 years ago

Your "mocha" test succeeds with my patch and fails without

guimard commented 5 years ago

I tried to compile rollup-plugin-string for Debian and to enable your test, where else do you want to post this issue ?

TrySound commented 5 years ago

I removed build step from this project long time ago. There is only index.js and main field points to it. There is no dist and not rollup.config.js anymore.

So I don't follow what is your issue.

guimard commented 5 years ago

Oups sorry, another developer made something wrong on Debian repo. Sorry for the noise