-
Notifications
You must be signed in to change notification settings - Fork 11
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
Watch mode doesn't work #22
Watch mode doesn't work #22
Comments
This is a known issue and isn't really a concern of this blueprint, it's marked I'm going to leave this issue open in case anyone else tries to report this issue but it's not something that is a concern of the blueprint, it's a concern of Embroider itself 👍 |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
I don't know if it is the same thing or the right thing to do, but I walked into the same kind of problem today. I wanted to try the new way to build my app so I installed the bleeding edge (I think)
But then after running This is now my import { defineConfig } from 'vite';
import {
resolver,
hbs,
scripts,
templateTag,
optimizeDeps,
compatPrebuild,
assets,
contentFor,
} from '@embroider/vite';
import { resolve } from 'path';
import { babel } from '@rollup/plugin-babel';
const root = 'tmp/rewritten-app';
const extensions = [
'.mjs',
'.gjs',
'.js',
'.mts',
'.gts',
'.ts',
'.hbs',
'.json',
];
export default defineConfig(({ mode }) => {
return {
root,
cacheDir: resolve('node_modules', '.vite'),
resolve: {
extensions,
},
plugins: [
hbs(),
templateTag(),
scripts(),
resolver(),
compatPrebuild(),
assets(),
contentFor(),
babel({
babelHelpers: 'runtime',
extensions,
}),
],
optimizeDeps: optimizeDeps(),
publicDir: resolve(process.cwd(), 'public'),
server: {
port: 4200,
host: '0.0.0.0', // added because I want to connect over the network
watch: {
usePolling: true, // added to do live-reload
ignored: ['!**/tmp/rewritten-app/**'],
},
},
build: {
outDir: resolve(process.cwd(), 'dist'),
rollupOptions: {
input: {
main: resolve(root, 'index.html'),
...(shouldBuildTests(mode)
? { tests: resolve(root, 'tests/index.html') }
: undefined),
},
},
},
};
});
function shouldBuildTests(mode) {
return mode !== 'production' || process.env.FORCE_BUILD_TESTS;
} |
I make a change to a file with the server running
The text was updated successfully, but these errors were encountered: