.@preactjs If I want to have different entry points, should I be able to run: preact watch --src <anotherfile.js>? I'm trying that but getting this error: Module not found: Error: Can't resolve 'preact-cli-entrypoint'
-
Show this thread
-
Replying to @Jasonprogrammer @preactjs
I'd suggest doing that in preact.config.js: ``` export default config => { config.entry = { page1: path.resolve(__dirname, 'src/page1.js'), page2: path.resolve(__dirname, 'src/page2.js'), page3: path.resolve(__dirname, 'src/page3.js') } } ```
1 reply 0 retweets 3 likes -
note that you'll be missing the nice export stuff preact-cli does, so your entry modules will need to do something like: import Page1 from './components/Page1'; import { render } from 'preact'; const into = document.getElementById('preact-root'); render(<Page 1 />, into);
1 reply 0 retweets 1 like
Replying to @_developit @preactjs
Awesome. Thanks!
9:23 AM - 18 Sep 2018
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.