Comments (2)
Hey, folks — questions like these are much better directed to the official Rollup issues (https://github.com/rollup/rollup). The issues you're hitting aren't related to the tutorial, so they don't really make sense here.
The short answer, though, is that the paths need to be relative.
So instead of:
import myScripts from 'js/myscripts';
Use:
import myScripts from './js/myscripts';
Good luck!
from learn-rollup.
And i meet same problem !!
- Config.js
import uglify from 'rollup-plugin-uglify'
import resolve from 'rollup-plugin-node-resolve'
import babel from 'rollup-plugin-babel';
import commonjs from 'rollup-plugin-commonjs';
import postcss from 'rollup-plugin-postcss';
// PostCSS plugins
import simplevars from 'postcss-simple-vars';
import nested from 'postcss-nested';
import cssnext from 'postcss-cssnext';
import cssnano from 'cssnano';
export default {
entry: 'src/main.js',
format: 'umd',
dest: 'dist/bundle.min.js',
sourceMap: true,
plugins: [
resolve({ jsnext: true, main: true }),
commonjs(),
babel({
exclude: 'node_modules/**'
}),
uglify(),
postcss({
plugins: [
simplevars(),
nested(),
cssnext({ warnForDuplicates: false, }),
cssnano(),
],
extensions: [ '.css' ],
})
]
}
main.js
import 'js/jsondiffpatch.min.js'
import 'js/jsondiffpatch-formatters.min.js'
import 'css/annotated.css'
import 'css/html.css'
class Customer {
constructor(name) {
this.name = name;
}
sayHi() {
console.log(`The name is: ${this.name}`)
console.info(`foo's Uppercase: ${_.upperCase('foo')}`)
}
}
let kevin = new Customer('kevin');
kevin.sayHi();`
CMD get errors !
lved – treating it as an external dependency
https://github.com/rollup/rollup/wiki/Troubleshooting#treating-module-as-externa
l-dependency
not be resolved – treating it as an external dependency
https://github.com/rollup/rollup/wiki/Troubleshooting#treating-module-as-externa
l-dependency
– treating it as an external dependency
https://github.com/rollup/rollup/wiki/Troubleshooting#treating-module-as-externa
l-dependency
ating it as an external dependency
https://github.com/rollup/rollup/wiki/Troubleshooting#treating-module-as-externa
l-dependency
from learn-rollup.
Related Issues (20)
- (uglify) WARN: Output exceeds 32000 characters HOT 1
- url changes for tutorial pointing to repo/repo issues HOT 1
- rollup-plugin-babel config change HOT 1
- rollup how to package multi-page application? HOT 2
- js test HOT 2
- Error: 'LinearProgress' is not exported by node_modules/material-ui/Progress/index.js HOT 2
- hi! thanks alot for the great tutorial! i am using livereload and it works, opening the index html directly in chrome. But when loading a local csv (d3.csv) i get cross origin problems. Is there a way to fix this? best malte HOT 1
- Get pug loader to work with rollup HOT 1
- How do I exclude files from the bundle? HOT 2
- Using rollup with multiple inputs HOT 1
- Babel's "Unexpected token error HOT 1
- Babel's "Unexpected token" error HOT 2
- Doesn't work. HOT 4
- Struggling HOT 7
- Configuration option is out of date in "Rollup.js Tutorial, Part 1: How to Set Up Smaller, More Efficient JavaScript Bundling Using Rollup" HOT 1
- Including PostCss results in syntax error HOT 1
- postcss-cssnext is deprecated HOT 1
- CSS is not insert into Head after building HOT 1
- rollup打包时怎么排除第三方组件所引进的样式文件 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from learn-rollup.