Skip to content
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

Incompatibility with browserify #189

Closed
muliyul opened this issue Aug 29, 2018 · 1 comment
Closed

Incompatibility with browserify #189

muliyul opened this issue Aug 29, 2018 · 1 comment

Comments

@muliyul
Copy link

muliyul commented Aug 29, 2018

I am using the exact versions of the following:

  • Browser: [Chome] Version: 68
  • AngularJS: 1.6.4
  • Angular UI Tour: 0.9.2

I have installed this library via: (NPM, Bower, or downloaded package)
npm

I have observed the following behavior:

Cannot find module '!!../../node_modules/css-loader/index.js!./angular-ui-tour.css' from '/Users/*/projects/*/node_modules/angular-ui-tour/dist'.

I substituted some of the path so ignore asterisks.

This is how I expected it to behave:
Bundle correctly with browserify

Here is my tour config, and all related step configs:
Irrelevant

Here's how I import AUIT: require('angular-ui-tour');
I've also attempted to use require('angular-ui-tour/dist/angular-ui-tour');

Additional info:
By removing these lines from the dist file I was able to require the file correctly so perhaps a webpack config issue?

// file: dist/angular-ui-tour.js lines 196-207
if(false) {
	// When the styles change, update the <style> tags
	if(!content.locals) {
		module.hot.accept("!!../../node_modules/css-loader/index.js!./angular-ui-tour.css", function() {
			var newContent = require("!!../../node_modules/css-loader/index.js!./angular-ui-tour.css");
			if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
			update(newContent);
		});
	}
	// When the module is disposed, remove the <style> tags
	module.hot.dispose(function() { update(); });
}
@benmarch
Copy link
Owner

benmarch commented Nov 1, 2018

Hey @muliyul, sorry for the long delay. Thank you for pointing this out, I released patch 0.9.4 to fix this.

@benmarch benmarch closed this as completed Nov 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants