Skip to content

Commit

Permalink
fix: ensure symlinks work for linking the example project
Browse files Browse the repository at this point in the history
  • Loading branch information
stristr committed Jun 13, 2019
1 parent bb7f79a commit a3b801c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/lorem-ipsum/examples/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"build": "webpack --mode production"
},
"dependencies": {
"diez-lorem-ipsum": "file:../../build/diez-lorem-ipsum-web",
"diez-lorem-ipsum": "link:../../build/diez-lorem-ipsum-web",
"react": "^16.8.6",
"react-dom": "^16.8.6"
},
Expand Down
1 change: 1 addition & 0 deletions examples/lorem-ipsum/examples/web/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const hotFilePath = join(__dirname, '..', '..', '.diez', 'web-hot-url');

const webpackConfig = {
entry: './src/index.jsx',
resolve: {symlinks: false},
module: {
rules: [
{
Expand Down
2 changes: 1 addition & 1 deletion packages/compiler/src/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const serveHot = async (

app.get('/components/:componentName', (request, response) => {
const {componentName} = request.params;
response.render('component', {componentName});
response.render('component', {componentName, layout: false});
});

const webpackConfig = getConfiguration(program, componentEntry);
Expand Down
2 changes: 1 addition & 1 deletion packages/compiler/test/hot.e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ describe('hot server', () => {
const compiler = new TestTargetCompiler(program);
await compiler.start();
expect(mockExitTrap).toHaveBeenCalled();
expect(mockExpressRender).toHaveBeenCalledWith('component', {componentName: 'foobar'});
expect(mockExpressRender).toHaveBeenCalledWith('component', {componentName: 'foobar', layout: false});

// Simulate attaching to an asset server.
mockWatcher.emit('add');
Expand Down
5 changes: 2 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6521,10 +6521,9 @@ dfa@^1.0.0:
dependencies:
babel-runtime "^6.11.6"

"diez-lorem-ipsum@file:examples/lorem-ipsum/build/diez-lorem-ipsum-web":
"diez-lorem-ipsum@link:examples/lorem-ipsum/build/diez-lorem-ipsum-web":
version "0.0.0"
dependencies:
lottie-web "^5.5.2"
uid ""

"diez-poodle-surf@link:examples/poodle-surf/build/diez-poodle-surf-web":
version "0.0.0"
Expand Down

0 comments on commit a3b801c

Please sign in to comment.