Skip to content
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

How to intergrate with next.js #59

Open
sukechris opened this issue Dec 24, 2018 · 3 comments
Open

How to intergrate with next.js #59

sukechris opened this issue Dec 24, 2018 · 3 comments

Comments

@sukechris
Copy link

sukechris commented Dec 24, 2018

Thanks for your great work, it's awesome!
I want to use this editor with next.js, however, it doesn't work, here is error messages:

Unexpected token .
/Users/tom/projects/demo/node_modules/rc-color-picker/assets/index.css:1
(function (exports, require, module, __filename, __dirname) { .rc-color-picker-panel-inner {
                                                              ^

SyntaxError: Unexpected token .
    at new Script (vm.js:79:7)
    at createScript (vm.js:251:10)
    at Object.runInThisContext (vm.js:303:10)
    at Module._compile (internal/modules/cjs/loader.js:657:28)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/Users/suke/projects/aza-demo/node_modules/@canner/slate-icon-fontbgcolor/lib/index.js:28:1)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)

Any help would be appreciated!

@davidroman0O
Copy link

I have the exact same problem!

@tiotdev
Copy link

tiotdev commented Apr 29, 2019

Same problem here, has anyone found a solution yet? I think some style loaders need to implemented in webpack, however, next-css and next-less don't do the trick.

@jbng
Copy link

jbng commented Nov 28, 2019

Hi,
Same issue.
Here are the libs I'm using:
"canner-slate-editor": "^1.5.4"
"next": "9.1.4"
"rc-color-picker": "^1.2.6"
"@zeit/next-css": "^1.0.1"

It seems that nextjs can't import a specific css source in node_modules/slate-icon-fontbgcolor/lib/index.js

require("rc-color-picker/assets/index.css");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants