Skip to content

Commit

Permalink
Use an absolute path for the loader
Browse files Browse the repository at this point in the history
  • Loading branch information
tmeasday committed Aug 1, 2022
1 parent 94aace5 commit 40e2eca
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ async function readMainConfig({ cwd }: { cwd: string }) {
return readConfig(mainConfigPath);
}

// NOTE: the test here will apply whether the path is symlink-preserved or otherwise
// NOTE: the test regexp here will apply whether the path is symlink-preserved or otherwise
const loaderPath = require.resolve('../code/node_modules/esbuild-loader');
const webpackFinalCode = `
(config) => ({
...config,
Expand All @@ -152,7 +153,7 @@ const webpackFinalCode = `
rules: [
{
test: [/\\/node_modules\\/@storybook\\/[^/]*\\/template\\/stories\\//],
loader: '../../code/node_modules/esbuild-loader',
loader: '${loaderPath}',
options: {
loader: 'tsx',
target: 'es2015',
Expand Down

0 comments on commit 40e2eca

Please sign in to comment.