You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 4, 2021. It is now read-only.
I try to write a demo according to the example you gave,the code is as follows
// rollup.config.js
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
export default {
input: 'src/example5/main.js',
output: {
file: 'dist/example5/bundle.js',
format: 'cjs'
},
plugins: [
resolve({
jsnext: true,
main: true
}),
commonjs()
]
}
// src/example5/main.js
import { named } from './module5.js';
export default function () {
console.log(named);
}
The problem is “src/example5/module5.js”
// this is ok
exports.named = 'cfangxu';
// if i write this, Terminal error:'named' is not exported by src/example5/module5.js
module.exports = {named: 'cfangxu'};
Thank you in advance for your answer
The text was updated successfully, but these errors were encountered:
I try to write a demo according to the example you gave,the code is as follows
The problem is “src/example5/module5.js”
Thank you in advance for your answer
The text was updated successfully, but these errors were encountered: