-
-
Notifications
You must be signed in to change notification settings - Fork 617
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: error message on not installed module loaders for configuration (#…
- Loading branch information
1 parent
d6380bb
commit 29eaa8e
Showing
3 changed files
with
46 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
const path = require('path'); | ||
|
||
const { run } = require('../../utils/test-utils'); | ||
|
||
describe('webpack cli', () => { | ||
it('should support mjs config format', () => { | ||
const { exitCode, stderr, stdout } = run(__dirname, ['-c', 'webpack.config.coffee']); | ||
|
||
expect(exitCode).toBe(2); | ||
expect(stderr).toContain(`Unable load '${path.resolve(__dirname, './webpack.config.coffee')}'`); | ||
expect(stderr).toContain('Unable to use specified module loaders for ".coffee".'); | ||
expect(stderr).toContain("Cannot find module 'coffeescript/register'"); | ||
expect(stderr).toContain("Cannot find module 'coffee-script/register'"); | ||
expect(stderr).toContain("Cannot find module 'coffeescript'"); | ||
expect(stderr).toContain("Cannot find module 'coffee-script'"); | ||
expect(stderr).toContain('Please install one of them'); | ||
expect(stdout).toBeFalsy(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
path = require 'path' | ||
|
||
config = | ||
mode: 'production' | ||
entry: './main.js' | ||
output: | ||
path: path.resolve(__dirname, 'dist') | ||
filename: 'foo.bundle.js' | ||
|
||
module.exports = config; |